I have the following HTML. And the text (tidbit) on the right keeps dropping off to the next line. This is in chrome. Is there a way to keep what is inside of the pull-right div together in one line? here is the jsFiddle.
<div class="container" style="width:500px;>
<div class="controls controls-row">
<span class="add-on">This can be quite long</span>
<div class="pull-right">
<input class="input-mini" name="Amount" type="number" />
<button type="button" class="btn" style="margin-bottom: 10px">Add</button>
<div style="text-align:right; width:40px;">tidbit</div>
</div>
</div>
</diV>
You can do this with two corrections:
display: inline-block
in the "tidbit" div.white-space: nowrap
to the pull-right
container.
<div class="container" style="width:500px;>
<div class="controls controls-row">
<span class="add-on">This can be quite long</span>
<div class="pull-right">
<input class="input-mini" name="Amount" type="number" />
<button type="button" class="btn" style="margin-bottom: 10px">Add</button>
<div style="text-align:right; width:40px; display: inline-block;">tidbit</div>
</div>
</div>
</diV>
.pull-right{
white-space:nowrap;
}
Example Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With