I’m using bootstrap text boxes as :
<div class="row">
<div class="col-lg-4">
<p>
<label>Contact List</label>
<select class="form-control" id="list" name="list">
<option value="">Please Select</option>
</select>
</p>
</div>
<div class="col-lg-10">
<p>
<input class="form-control" id="contact_id" maxlength="3" size="4" name="contact_id">
<button type="button" class="btn btn-primary" id="load_contact">Load Contact</button>
</p>
</div>
I would like to align textbox and button at the right side of dropdownlist, but currently textbox is aligned through out the page.
Here is a screenshot :
2
Answers
please change
col-lg-10
tocol-lg-8
Bootstrap use a 12 columns based row…
You have (for large view : col-lg) 14 columns ( col-lg-4 + col-lg-10 )
So just modify this to have a sum of 12 ( 4 + 8 ) ( I changed to col-xs for see it a xtra small )
Here is a fiddle