jquery - How to align (width wise) bootstrap select dropdown with input box? -


i using bootstrap select on form. below having input box. have input box's width similar select box.

<div class="container-fluid">   <div class="row">     <div class="col-md-12">       <select class="selectpicker">         <option>mustard</option>         <option>ketchup</option>         <option>relish</option>       </select>     </div>   </div>   <div class="row">     <div class="col-md-2">     </div>     <div class="col-md-8">       <input class="form-control" id="input_id" type="text" value="" />     </div>     <div class="col-md-2">     </div>   </div> </div> 

please see: https://jsfiddle.net/5l30q27f/8/

in bootstrap-select.css, appears width has been set 220px. use exact width input box not think idea, since suspect on mobile devices bootstrap-select might changing width else.

currently, controlling input box's width using columns, not right solution. ( width appears vary depending on screen size ).

i using bootstarp first time. there chance overlooking obvious provided bootstrap solve problem.

could please point me right direction?

bootstrap has few options setting width of element depending on screen size http://getbootstrap.com/css/#grid-options. changing gird use xs option in fiddle gets result want.

https://jsfiddle.net/5l30q27f/9/


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -