4 ms·
You can use the font-size property as usual, if you convert the font definition from px units to em units. EDIT: Demo with font-size: https://jsfiddle.net/6cg8
by tuukkah 9y ago
You can use the font-size property as usual, if you convert the font definition from px units to em units.
EDIT: Demo with font-size: https://jsfiddle.net/6cg8dLnz/ https://jsfiddle.net/6cg8dLnz/
- Steuard 9y agoYeah, that really surprised me: for a font in particular, why wouldn't you use em? (Is there a benefit to using pixels that I'm overlooking?)
- tuukkah 9y agoBaseline is broken with display: inline-block but works with float: left: https://jsfiddle.net/eywwmL2o/ https://jsfiddle.net/eywwmL2o/ Haven't figured out how to fix kerning if it's even supposed to work.
- Izkata 9y agoLike this: https://jsfiddle.net/95v642n6/ https://jsfiddle.net/95v642n6/ .font div { display: inline-block; vertical-align: top; } .H + .U { margin-left: 2px; } .U + .G { margin-left: 1px; } .G + .E { margin-left: -5px; }