I have text in a paragraph with a button a
element:
<p>
<a class="btn btn-default" href="#">Take exam</a>
<span class="text-muted">Available after reading course material</span>
</p>
However, this renders with the two not vertically aligned.
What is the best way to align the text baseline here?
Fiddle at http://jsfiddle.net/0j20stbh/
Using the same styling as the .btn
would probably be a good approach. Example with disabled .btn
<p>
<a class="btn btn-default" href="#">Take exam</a>
<span class="text-muted btn" disabled="true">Text</span>
</p>
.btn-align
with the same attributes. Example
CSS
.btn-align {
padding: 6px 12px;
line-height: 1.42857143;
vertical-align: middle;
}
HTML
<p>
<a class="btn btn-default" href="#">Take exam</a>
<span class="text-muted btn-align">Available after reading course material</span>
</p>
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