I am new to CSS and I am facing an issue with my search form in the navbar. When I initially load the page, the search form appears on 2 lines but when I refresh the page, it aligns properly with the other elements. How can I ensure that the search form stays in-line consistently?
<div class="blog-masthead">
<div class="container">
<nav class="blog-nav">
<a class="blog-nav-item" href="{{ path('general_sym_project_homepage') }}">Home</a>
<a class="blog-nav-item" href="#">New features</a>
<a class="blog-nav-item" href="http://www.stackoverflow.com">Stack Overflow</a>
<a class="blog-nav-item" href="http://www.symfony.com">Resources</a>
<a class="blog-nav-item" href="{{ path('general_sym_project_about') }}">About</a>
<form class="navbar-form navbar-right">
<input type="text" class="form-control" placeholder="Search...">
</form>
</nav>
</div>
</div>
.blog-nav-item {
position: relative;
display: inline-block;
padding: 10px;
font-weight: 500;
color: #cdddeb;
}
.blog-nav-item:hover,
.blog-nav-item:focus {
color: #fff;
text-decoration: none;
}
/* Active state gets a caret at the bottom */
.blog-nav .active {
color: #fff;
}
.blog-nav .active:after {
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 0;
margin-left: -5px;
vertical-align: middle;
content: " ";
border-right: 5px solid transparent;
border-bottom: 5px solid;
border-left: 5px solid transparent;
}