How do I align two different-sized fonts next to each other so that the smaller text is centered vertically with the larger text?
#first {
font-size: 200%;
}
#second {
font-size: 100%;
}
<div id="parent">
<span id="first">first</span>
<span id="second">second</span>
</div>
JSFiddle: http://jsfiddle.net/BmbWr/
You can use the vertical-align: middle
property
span {
vertical-align: middle;
}
#first {
font-size: 200%;
}
#second {
font-size: 100%;
}
<div id="parent">
<span id="first">first</span>
<span id="second">second</span>
</div>