I am using twitter bootstrap. Here is my code:
<div class="control-label">
We
<div class="btn-group">
<a href="javascript:;" data-toggle="dropdown" class="btn dropdown-toggle">
<span>search</span> <span class="caret"></span>
</a>
</div>
Something
</div>
How can I make the texts and the button appear in one line aligned to the left using thw twitter bootstrap classes?
Classes only
Btn toolbar
If you want to stick strictly to classes, you can try
.btn-toolbarbut you won’t have the vertical alignment.Demo btn-toolbar
Floating
Floating doesn’t seem to be an appropriate solution because you loose the line continuity. So you shouldn’t use
.pull-left.CSS
Otherwise there are several solutions :
No btn-group
First of all you could remove the
div.btn-groupsince apparently you are not using it.Demo no div
Inline blocks
Or you could use
display: inline-block;on all elements (but you should enclose text in blocks).Demo inline blocks