html - Set List Box width to fill column width in Bootstrap -
i have 3 list boxes part of html. list box fill column, width of listbox same width of column, not able so. in 'col-md-12', width of list box should width of screen. have tried this:
- set width of list box "width:100%" on each individual listbox.
- set width of parent div "width:100%" on each individual listbox.
- i have tried use container-fluid on root div.
but no luck.
i not want set width static size ('width: 550px').
<div class="form-horizontal container"> <hr /> <div class="form-group row"> <div class="col-md-6"> <select class="form-control" multiple="multiple" style="font-size:large"> <option value="1">test234</option> <option value="3">test123</option> </select> </div> <div class="col-md-6"> <select class="form-control" multiple="multiple" style="font-size:large"> <option value="26">svc1</option> <option value="27">svc2</option> <option value="28">sp1</option> <option value="29">pn1</option> </select> </div> </div> <div class="form-group row col-md-12"> <select class="form-control" multiple="multiple" name="items" style="font-size:large"></select> </div> </div>
update #1:
as did not mention in question part of mvc view, here little hint, have blindly overlooked , spend hours trying fix. mine solution worked ok, when create new mvc 5 website project in visual studio 2013, creates it's own css file called site.css. in file has line looks this:
/* set width on form input elements since they're 100% wide default */ input, select, textarea { max-width: 280px; }
which, whatever (in case pulling hair), not let change width. after commenting out, worked fine.
hope someone...
try this:
<hr /> <div class="panel row"> <div class="col-md-6"> <select class="form-control" multiple="multiple" style="font-size:large"> <option value="1">test234</option> <option value="3">test123</option> </select> </div> <div class="col-md-6"> <select class="form-control" multiple="multiple" style="font-size:large"> <option value="26">svc1</option> <option value="27">svc2</option> <option value="28">sp1</option> <option value="29">pn1</option> </select> </div> </div> <div class="form-group row col-md-12"> <select class="form-control" multiple="multiple" name="items" style="font-size:large"></select> </div>
Comments
Post a Comment