When placing a Bootstrap 3 button with class btn-link
in a block of text, the vertical alignment seems to be out by a few pixels:
<div>Foo<button class="btn btn-link">Button</button>Bar</div>
How can I fix this? Removing the padding from the button improves the issue somewhat, but I'm still seeing a discrepancy of a few pixels.
The best way to fix this would be to wrap the text nodes with <span>
elements and then modify the vertical-align
property:
div span {
vertical-align: middle;
}
<div>
<span>Foo</span>
<button class="btn btn-link">Button</button>
<span>Bar</span>
</div>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments