I have an input tag for a search bar and a button to the right where users can click to hit enter. However, there's a spacing between the search box and the button and I'm not able to find out why. I tried using chrome's inspect element to find out if the reason if because of some misplaced padding-left/right but nothing indicates that, so I'm not sure why.
Here's my html and css
.left-nav input[type=text] {
background-color: #2B2B2B;
margin-left: 50px;
padding: 8px;
border: none;
border-radius: 8px 0px 0px 8px;
font-size: 17px;
}
.left-nav ::placeholder {
padding-left: 6px;
}
.left-nav button {
padding: 11px 15px;
background: rgb(184, 184, 184);
border: none;
border-radius: 0px 8px 8px 0px;
cursor: pointer;
}
<div class="left-nav">
<input type="text" placeholder="Search...">
<button type="submit"><i class="fas fa-search fa-lg" ></i></button>
</div>