styles.css
The style sheet used for this project is shown in Example 21-13. There are a number of sets of declarations, as follows:
*Sets the default font family and size for the project using the universal selector.
bodySets the width of the project window, centers it horizontally, specifies a background color, and gives it a border.
htmlSets the background color of the HTML section.
imgGives all images a border, a shadow, and a righthand margin.
li a, and.buttonRemove underlines from hyperlinks in all
<a>tags that are within a<li>element, and all elements employing thebuttonclass.li:ahoverand.button:hoverSet the color in which
<li>elements and thebuttonclass should display text when hovered over..appnameSets the properties for the heading (which uses the
appnameclass), including centering, background and text colors, the font family and size, and the padding..fieldnameSets the width of elements using the
fieldnameclass by first floating them..mainApplies an indent to elements that use it.
.infoUsed for displaying important information: sets a background and foreground text color, applies a border and padding, and indents elements that employ it.
.menu li, and.buttonEnsure that all
<li>elements and thebuttonclass display inline, have padding applied, and have a border, a background and foreground text color, a right margin, rounded borders, and a shadow (resulting in a button effect)..subheadEmphasizes sections of text.
.taken,.available,.error, and.whisperSet the colors ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access