I'm doing navbar with search box using Bootstrap and I have problem on mobile. At screen width 576px or above it looks like I want but below, the search icon moves under the input.
Any ideas why it happens and how to solve it? I tried several solutions and nothing works. I don't have any media queries below 576px. I have only for max-width:992px.
body {
background-color: black !important;
}
.mobile-form {
border: none;
color: #ffffff;
background-color: #292935;
}
.mobile-border {
border-bottom: 1px solid #ffffff;
margin-left: 20px;
margin-right: 20px;
}
.mobile-search-icon {
float: right;
margin-top: 10px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" rel="stylesheet">
<form class="form-inline d-block d-lg-none mobile-border">
<input class="form-control mobile-form" type="search" placeholder="Search our site" aria-label="Search">
<i class="fas fa-search text-white ml-3 mobile-search-icon" aria-hidden="true"></i>
</form>