The color is not a major problem, but the alignment is slightly more serious.
The text in the footer is slightly different to what we had in our version. Again, this is not a big problem. Looking at your code, it is down to an unneeded font-weight: 500; declaration in the following rule:
I have had a look at your work, and it looks perfect! It works exactly the same as our version, and there is nothing I can really comment on here. Well done on some great work!
I’ve had a look at your code, and it looks pretty much perfect — well done!
The only difference I noticed was that your address text is brighter, but this is definitely a good thing — the contrast was a bit dull on the original.
Hi there @nikolaesku, and thanks for sending your code in!
This looks pretty much perfect, and you’ve got the specificity calculations right.
Your background and foreground colors are different to ours on the central area, but this is better for accessibility purposes.
The only minor thing to mention is that your footer text isn’t quite centered. You used the following:
.card footer p {
font-size: 1.5em;
line-height: 1.75em;
}
Whereas we used this:
.card footer p {
font-size: 1.5em;
line-height: 2;
}
The parent <footer> element’s height is 3em, so if we set the text font-size to 1.5em then use a line-height of 2, we get an overall text height of 3em — the unitless 2 value acts as a multiplier, so the font size of 1.5em is multiplied by 2 to equal a computed line-height value of 3em.
Just a head’s up… this assessment is somewhat “hidden” in the flow of the tutorial list. Even on the page that this assessment sits on, if you look on the left navigation panel, it is not there. And the last tutorial, “Organizing Your CSS”, does not link or lead to it. I happened to find it, and bookmarked it, when I was looking up something else, completely unrelated. I checked the navigation panel to see when it would be coming up, and it wasn’t there. But I figured out where it was supposed to be, and have taken the assessment now.
Hi @chrisdavidmills, it’s been a while, but I’ve been learning HTML & CSS every night of the last 34 nights I’ve finally made my way to the MDN CSS assessments.
Hi @Pawper, nice to hear from you, and glad you’ve been having fun with your learning
This looks really good — your example does exactly what it is supposed to do, and as a bonus, you’ve changed the background color in the middle section to make the contrast better. Nice work!
Your problem here stems from the fact that you’ve got the card class set on not only the <section> element, but also the <header> and <footer> elements too. So the styles applied to the overall card are being applied to those elements too, leading to some strange visual effects.
Removing the card class from <header> and <footer> should solve most of your problems.
After that, you can probably simplify your CSS too, as you won’t need the stuff that is trying to override the card styles.
Go to the developer tools and find the line-height value, write different values there and find what you need, and then add this value to your property in the code