html - CSS: Place Bootstrap input's label above it? -


i using bootstrap in design , need place input's label above labels sitting next inputs causes inputs not 100% width.

this example of issue:

https://jsfiddle.net/od5lc5cz/1/

and current code is:

  <div class="form-group">     <div class="input-group">  <label for="gst">commission</label>     <span class="input-group-addon">%</span>     <input id="coms" type="text" class="form-control" name="coms" placeholder="commission" value="">   </div>   </div> 

could please advice on issue?

your code organization incorrect, .input-group designed collect items in single line. solution move <label> outside class:

<div class="form-group">     <label for="gst">commission</label>     <div class="input-group">         <span class="input-group-addon">%</span>         <input id="coms" type="text" class="form-control" name="coms" placeholder="commission" value="">     </div> </div> 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -