Reputation: 1749
Is there any way that inside a input-group the span to be on top and not on the left ?
I would like it to be like this :
Title
line_1
line_2
line_3
I have tried wrapping the span with a div.input-group but the span and the select are not together anymore, they are separated.
Here is the html code :
<div class="input-group">
<span class="input-group-addon">Title</span>
<select class="form-control" multiple="multiple" size="3">
<option value="line_1">line_1</option>
<option value="line_1">line_2</option>
<option value="line_1">line_3</option>
</select>
</div>
Upvotes: 0
Views: 712
Reputation: 1584
The bootstrap input-group-addon
class is positioning the element in that location. If you don't want the default bootstrap behavior, you either need to over-ride it (usually with !important
as part of the css declaration) or remove the bootstrap class from the element.
Removing the class and setting to block: http://jsfiddle.net/c60h2z0v/1/
Upvotes: 1
Reputation: 341
The span is an inline element like text, input, select etc. Therefor its added besides the select. If you want the span to be on top of the select, then you either needs to:
Upvotes: 1