I'm working on an autocomplete form, but I seem to have some issues with the padding between the text and submit form. I cannot seem to adjust the spacing between the text and submit items, which I need because when I increase the size of the text field, it overwrites the submit button. I believe I've tried all types of padding but they do nothing. Can someone give me a clue please?
.autocomplete {
position: relative;
display: inline-block;
}
input {
border: 1px solid;
padding: 5px;
font-size: 24px;
}
input[type=text] {
border-color: #808080;
background-color: #fff;
width: 100%;
-webkit-border-radius: 5px;
padding: 5px;
}
input[type=submit] {
margin-left: 5px;
padding: 5px;
background: #ccc;
cursor: pointer;
-webkit-border-radius: 5px;
border: 1px solid;
background-color: DodgerBlue;
border-color: #CCCCCC;
color: #fff;
}
<form autocomplete="off" action="/action_page.php">
<div class="autocomplete" style="width:300px;">
<input id="myInput" type="text" name="myCountry" placeholder="Country">
</div>
<input type="submit">
</form>