Fundamental CSS comprehension assessment!!

This is the assessment

And this is my work

Thank you! :smiley:

Hi @das.serban

Nice work! :tada:

I recommend using unitless line-height values. See for an explanation.

To vertically center the text in header and footer you can make sure that font-size * line-height = height. For example:

.card header, .card footer {
  height: 3em;
  padding: 1em;

.card header h2 {
  font-size: 2em;
  line-height: 1.5;

.card footer p {
  font-size: 1.5em;
  line-height: 2;

See how both multiplications equal to 3em? Thatโ€™s the corresponding height of the parent. This also makes sure that the whole height of the card is 5em (header) + 12em (article) + 5em (footer) = 22em (card). Isnโ€™t it nice how everything fits together? :slightly_smiling_face:

Have a nice weekend,

Thank you for your recommendations! This was very helpful and it is always good knowledge to learn! :smiley: :smiley:

1 Like