I am getting my head around twitter bootstrap 3 and specifically the column setup. I got a 2 columns on the same line:
<!--datetime row-->
<div>
<div class="col-md-6 form-group">
<label for="">Title:</label>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown"
aria-expanded="true">
Dropdown
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
</ul>
</div>
</div>
<div class="col-md-6 form-group">
why is this left instead of right aligned??
</div>
</div>
The problem is I cannot get the second column to sit to the right where the dropdown is. So I would like the dropdown in the first column and in the second column the ‘why is this…’ text. What causes this? Here is a ref to the full snippet: http://plnkr.co/edit/tufLd2?p=preview
4
Answers
You can add ‘
text-right
to your<div class="col-md-6 form-group">
please see here
http://plnkr.co/edit/rUAdxLJ6ExKZYFbkveuC?p=preview
and if you want to have column for 50% of screen even on small devices
change
col-md-6
tocol-xs-6
http://plnkr.co/edit/RxPx0zzT5YmodepQ3zIj?p=preview
Copy this code in your example and scratch the preview window to the left.
Live example
This might solve the problem
Live Demo