CyberStars

CSS Recap

No new theory, just a challenge that uses what you have learned in CSS: classes, colors, backgrounds, contrast, fonts, text alignment and sizes in rem.

This time, nobody tells you which property does what. Look at how the sign should look, and choose the properties yourself.

If a style doesn't show, check three things. Is the class the same in the HTML and in the CSS? Does every declaration end with ;? Is there a rule further down the file that says something else?


Mission: The visiting hours sign

What you will see: under Visiting Hours, the three lines of hours sit on a panel with a different color from the page. They are centered, in a font like a typewriter's, where every letter has the same width.

The visiting hours should look like the sign on a museum's door: a panel of their own, away from the rest of the page.

  • The paragraph with the hours has the class hours.
  • It has a background the other paragraphs don't have.
  • Its text uses a list of fonts that ends with monospace.
  • Its text is centered.
  • Its text has a contrast of at least 4.5:1 with its background.