Home › Forums › CSS › Equating line-height to vertical margin › Reply To: Equating line-height to vertical margin
July 2, 2015 at 12:35 pm
#204518
Participant
OK, so lets say my CSS is like so:
body { font-size: 1.6em, line-height: 1.8 }
h1 { font-size: 2.4em; margin: 1em; }
So in my example, h1 would have an inherit ‘line-height’ of ‘33.6px’. My question is, how do I get the ‘margin: 1em’ to EQUAL the inherit ‘line-height’ without having to calculate each time?