Positioning a select over a search bar - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Positioning a select over a search bar

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
div {<!--from  w w w.  ja v a2 s. c  o m-->
   float:left;
   width:100%;
}

div input {
   width:100%;
}

select {
   position:relative;
   top:-21px;
   left:5px;
}
</style> 
 </head> 
 <body> 
  <div style="position:relative;zoom:1"> 
   <input autocomplete="off" class="lst" type="text" name="q" maxlength="2048" value="" title="Search" spellcheck="false" tabindex="1"> 
   <span id="tsf-oq" style="display:none"> </span> 
  </div> 
  <select id="menu" class="InPage " tabindex="2" style="position: relative; float:right;"> <option value="9999">Lorem ip</option> </select>  
 </body>
</html>

Related Tutorials