I would like to align the bootstrap button to the right as per the diagram. Please note I am using Bootstrap Panels and form-horizontal
:
By default the buttons are put beneath the options. what I have tried:
<button style="float: right" type="button" id="show-contact-modal-button" class="btn btn-primary">
This aligns the button to the right but still beneath the dropdown.
<div class=text-right><button ...>
This actually completely removes the button :-)
Here is the more complete HTML:
...
<form class="form-horizontal" role="form" method="POST" action="http://host/lead">
...
<!-- Contacts -->
<div class="form-group">
<label for="contact_id" class="col-md-2 control-label">Contact</label>
<div class="col-md-8">
<select name="contact_id" id="contacts-select" class="form-control" title="">
<option value="1"
>
Eugene van der Merwe</option>
<option value="2"
>
Person B</option>
<option value="3"
>
Person C</option>
</select>
<button type="button" id="show-contact-modal-button" class="btn btn-primary">
Add contact
</button>
</div>
</div>
<!-- // Contacts -->
<!-- Referrer -->
<div class="form-group">
<label for="referrer_id" class="col-md-2 control-label">Referrer</label>
<div class="col-md-8">
<select name="referrer_id" id="referrers-select" class="form-control" title="">
<option value="1"
>Eugene van der Merwe</option>
<option value="2"
>Person B</option>
<option value="3"
>Person C</option>
<div class=text-right>
<button style="float: right" type="button" id="show-referrer-modal-button" class="btn btn-primary">
Add referrer
</button>
</div>
</select>
</div>
</div>
<!-- // Referrer -->
<div class="form-group">
<div class="col-md-8 col-md-offset-2">
<button type="submit" class="btn btn-primary">
Create
</button>
</div>
</div>
</form>