L is for line-height
In this quick tip, we'll look at a shorthand for setting font-size and line-height together to save yourself a couple of extra keystrokes.
line-height
, as discussed in the original screencast video, is a property for setting the height of a line in CSS. It's similar (but slightly different) to leading in print design.
Tip 1
line-height
only applies to elements that have their display
set to inline
or inline-block
and it actually sets the height of the line box that bounds the element. If you set line-height
on a block element, you may still see some changes to your styles but it's actually the inline
child elements that are being affected as line-height
is an inherited property.
Continue reading %AtoZ CSS Quick Tip: Setting the Line-Height%
by Guy Routledge via SitePoint
No comments:
Post a Comment