Check out this code snippet:
<div class="headmenus">
<ul>
<li><a href="index.php">HOME</a></li>
<li><a href="about.php">ABOUT US</a></li>
<li><a href="search.php">COURSES</a></li>
<li><a href="vacancies.php">VACANCIES</a></li>
<li><a href="contact.php">CONTACT US</a></li>
<li></li>
</ul>
</div>
<div class="searchform2">
<form action="search.php#goto1" method="get" id="headersearch">
<input type="hidden" name="p" value="0" />
<input type="text" name="keyword" id="headerkeyword" placeholder="Search any keyword" value="" />
<input type="submit" value="SEARCH" class="but1" />
</form>
</div>
I want the headmenus and searchform2 to appear next to each other, but currently the searchform2 appears on a separate line.
Below is the CSS for searchform2:
.searchform2 {
float: right;
display: inline;
clear: left;
width:auto !important;
border:2px solid #616566;
}
.searchform2 input {
border:2px solid #616566;
float: left;
}
.searchform2 .but1 {
background: url("images/search.png") no-repeat scroll 8px 9px #89AB20;
border: 0 none !important;
color: #FFFFFF !important;
float: right !important;
display: inline;
font-weight: bold;
padding: 6px 12px 6px 23px !important;
width: auto !important;
font-family: Arial;
font-size: 12px;
height: 30px;
margin-right: 0 !important;
cursor:pointer;
}
And here's the CSS for headmenus:
.headmenus {
background: none repeat scroll 0 0 #0086B2;
display: inline;
float: left;
margin: 0;
width: 100%;
}
.headmenus ul {
border-bottom: 1px solid #FFFFFF;
border-top: 1px solid #FFFFFF;
display: inline;
float: left;
font-family: 'texgyreadventorregular';
font-size: 14px;
margin: 0;
padding: 0;
width: 100%;
}
.headmenus ul li {
border-right: 1px solid #FFFFFF;
color: #FFFFFF;
display: inline;
float: left;
list-style-type: none;
padding: 0;
text-align: center;
width: 13.35%;
}
.headmenus ul li a {
color: #FFFFFF;
display: inline;
float: left;
font-family: 'texgyreadventorregular';
font-size: 14px;
list-style-type: none;
text-align: center;
width: 100%;
padding:5px 0px;
}
.headmenus ul li:last-child {
border-right: 0 none;
float: right;
width: auto; !important
}
.headmenus ul li:hover {
background: #89ab20;
cursor: pointer;
}
.headmenus ul li.active {
background: #89ab20;
}