javascript - Align select tags horizontally -


<div style="width:100%;" id="combodiv">        <div style="width: 100px;">         <select style="width: 100%;"/>     </div>     <div style="width: 200px;">         <select style="width: 100%;" />     </div>     <input type="text" style="width: 10%; float:right;" /> </div> 

i need align these 3 items in line getting 1 select tag , input box. have tried applying float style both divs , various other css styles unable 2 select tags in row along right aligned text box.

you haven't closed <select></select> , use float:left align both div horizontally.

<div style="width:100%;" id="combodiv">        <div style="width: 100px; float:left;">         <select style="width: 100%;" >           <option value="1">1</option>           <option value="2">2</option>         </select>     </div>     <div style="width: 200px; float:left;">         <select style="width: 100%;" >           <option value="1">1</option>           <option value="2">2</option>         </select>     </div>       <input type="text" style="width: 10%; float:right;" />  </div>

update

or can use display:inline , remove unnecessary div :

<div style="width:100%;" id="combodiv">      <select style="width: 100px; display:inline;" >        <option value="1">1</option>        <option value="2">2</option>     </select>         <select style="width: 200px; display:inline;" >        <option value="1">1</option>        <option value="2">2</option>     </select>       <input type="text" style="width: 10%; float:right;" />  </div>


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -