how to design a two column form using bootstrap 2.3.2 where the 2nd column takes up the rest space -


i design 2 column horizontal form using bootstrap v2.3.2. following html:

<div id='content' class='row-fluid'> <div class='span12 main'> <h2>product data</h2> <form class="form-horizontal"> <fieldset> <div class="form-group">     <label for="inputappname" class="control-label col-xs-2">application name&nbsp;  </label> <div class="col-xs-10"> <input type="text" class="form-control" id="app_name" name="app_name" placeholder="application name"> </div> </div> <div style="height:10px;"></div> <div class="form-group"> <label for="inputappdesc" class="control-label col-xs-2">description&nbsp;</label> <div class="col-xs-10"> <textarea class="form-control" id="app_desc" name="app_desc" rows="4" placeholder="application description"></textarea> </div> </div> </fieldset> </form> </div> </div> 

i find width of input-text , textarea on second column smaller. extend them take rest space. tried use "input-block-level" class input-text , textarea not on same row label.

can help?

thanks in advance!

the first thing don't use bootstrap 3 class...

try bootstrap 2 instead... replace col-xx-[1-12] span[1-12]

your code input in span11 :

http://www.bootply.com/119374

<div id="content" class="row-fluid">     <div class="span12 main">         <h2>product data</h2>       <form class="form-horizontal">         <fieldset>           <div class="form-group row-fluid">             <label for="inputappname" class="control-label span2">application name&nbsp;  </label>             <div class="span10">               <input type="text" class="form-control span11" id="app_name" name="app_name" placeholder="application name">             </div>           </div>           <div style="height:10px;">           </div>           <div class="form-group row-fluid">             <label for="inputappdesc" class="control-label span2">description&nbsp;</label>             <div class="span10">               <textarea class="form-control span11" id="app_desc" name="app_desc" rows="4" placeholder="application description"></textarea>             </div>           </div>         </fieldset>       </form>     </div> </div> 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -