Hi, could you please send me the final version of CSS for this exercise, so that I can compare it with mine and notice what my mistakes are?
Hi @JoaqinCs and welcome to the community
For the assessments you can find the solution code together with a marking guide in a folder next to the folder with the starting code on GitHub. For this exercise this would be here: https://github.com/mdn/learning-area/tree/main/css/introduction-to-css/fundamental-css-comprehension-finished.
For the smaller “skill tests” the marking guide is mostly in the same folder as the starting code.
I hope that helps
Have a nice day,
Michael
PS: Your email address is visible in your post. It ended up in the optional “name” field of your profile. I recommend removing it.
Hi, Michael:
I have a follow-up question for the Fundamental CSS comprehension. Why is the correct line height 1.5 to place the
in the center of the header’s content box? How you calculate that number?
Thank you
The forum removed the markup in your post, but I think I know what you’re trying to ask. Otherwise, let me know.
The actual line height will be calculated by multiplying the font-size
of the element with the line-height
value. For the header this results in 2em * 1.5 = 3em. The height of the header content is also define as height: 3em;
in another selector. So the actual line height and the height
match, which will result in the vertically centered text.