Change position of Bootstrap label
I wanted to get Bootstrap label and textbox on the same line (here I need the label to be in front of the textbox)
code:
<div class="form-group">
</div>
<div class="col-md-4 col-md-offset-8">
<label class="col-sm-2 control-label">Total Tax</label>
<input type="text" class="form-control" id="tottax" />
</div>
+3
source to share
2 answers
I usually use string within strings to solve something like this.
This code works for me:
<div class="form-group">
<div class="row">
<div class="col-md-6 pull-left">
<label class="control-label">Total Tax</label>
</div>
<div class="col-md-6">
<input type="text" class="form-control" id="tottax" />
</div>
</div>
</div>
+1
source to share
You need to use form-horizontal if you want to display like this .
<div class="form-horizontal">
<div class="form-group">
<label class="col-md-2 col-sm-3 col-xs-4 control-label">VAT</label>
<div class="col-md-9 col-sm-9 col-xs-8">
<textbox class="form-control">teetetet</textbox>
</div>
</div>
</div>
+6
source to share