Learning
web development: Marking guides and questions
why if the height of the card header and card footer are
absolute, is it useful to use relative unitless line-height
values?
why is the total height of both 50 and not 60?
maybe too silly question but what differs from setup card container
and main content?
So, unitless line-height values are useful because they size the
line height relative to the font-size, so if you change the
font-size the line-height will stay correct relative to what it was
before. Also, it is a useful way of centering the text inside the
line.
The total height is 50 because you’ve got a content height of
30, and then a top and bottom padding of 10 — 30 + 10 + 10 = 50.
The easiest way to visualize this is to use the developer tools’
visual box model display:
Screen Shot 2017-10-27 at
14.39.45.png1450×273 29.9
KB
As for the last point, I’m not 100% sure what you mean — are you
asking why we have a <section class=“card”></section>
wrapper present in the example?