HTML and CSS Reference
In-Depth Information
4. Create a style rule to set the default style for every element so that every element:
a) is displayed in a Verdana, Geneva, or sans-serif font; b) has a font size of 100%;
and c) has a padding and margin space of 0 pixels.
5. Remove the underlining from every hypertext link within a nav element.
6. Create a style rule for the page body that: a) positions the page using relative posi-
tioning; and b) sets the page width to 98% of the width of the browser window in a
range from 1000 pixels up to 1400 pixels.
7. Create a style rule for the header element that: a) places the header at the coordi-
nates (0, 0) using absolute positioning; b) sets the width to 20% of the page body;
c) changes the background color to black; and d) adds a 500-pixel padding space to
the bottom of the element.
8. For inline images within a header element, set the width to 100% of the width of
the header.
9. Set the width of the horizontal navigation list to 80% with a left margin of 20%.
For list items within the horizontal navigation list, add styles to: a) display each list
item as a block fl oated on the left; b) set the width of each list item to 20%; c) set
the background color to the value (49, 38, 31); d) set the upper and lower padding
space to 5 pixels; e) horizontally center the list item text; and f) transform the text to
uppercase letters, setting the font size to 85%.
10. Set the color of hypertext links in the horizontal navigation list to white. If the user
hovers the mouse pointer over the link, change the color to the value (215, 181, 151).
11. For every list item in the vertical navigation list, set the font size to 85% and remove
the list style marker. If the list item belongs to the newgroup class, add a top pad-
ding space of 25 pixels to add a bigger gap between that list item and the previous
list item.
12. For every hypertext link within the vertical navigation list, set the font color to white,
set the display property to block, and indent the text 10 pixels. If the user hov-
ers the mouse pointer over the hypertext link, change the background color to the
value (51, 51, 51) and add a 2-pixel solid outline with the color value (215, 181, 151).
13. Add the following styles to the main section of the page: a) fl oat the main section
on the left margin once the left margin has been clear of previously fl oated objects;
b) set the size of the left margin to 21%; c) set the size of the top margin to 20 pixels;
and d) set the width of the main section to 49% of the page body.
14. For h1 headings that are direct children of the main section, add styles to: a) set
the text color to the value (189, 131, 82); b) set the font size to 180% with normal
weight; and c) set the letter spacing to 5 pixels.
15. Set the margins of paragraphs within the main section to 15 pixels. For the unor-
dered list within the main section: a) display a disc marker; b) set the margin around
the entire unordered list to 25 pixels; and c) set the bottom margin of each list item
to 10 pixels.
16. For the aside element, create a style rule to: a) add a 3-pixel solid border with the
color value (149, 91, 42) and set the text color to the value (149, 91, 42); b) fl oat the
aside element on the right with a margin of 10 pixels; c) set the width to 50% of the
width of the main section; and d) add a rounded border with a radius of 30 pixels.
For paragraphs within the aside element, set the font size to 90% and the margin to
20 pixels.
17. For the article element, create a style rule to: a) fl oat the element on the left with
a width of 29% and a left margin of 1%; and b) set the background color to the
value (215, 181, 151).
Search WWH ::




Custom Search