Assignment 3

5.1 Assume that the size of the base font on a system is 12 points.
a) How big is a 36-point font in ems? 3 ems
b) How big is a 9-point font in ems? .75 ems
c) How big is a 24-point font in picas? 2 picas
d) How big is a 12-point font in inches? 1/6 inches
e) How big is a 1 inch font in picas? 6 picas

5.2 Fill in the blanks in the following statements:
a) Using the link element allows authors to use external style sheets in their pages.
b) To apply a CSS rule to more than one element at a time, separate the element names with a comma.
c) Pixels are an relative length measurement.
d) The hover pseudoclass is activated when the user moves the mouse cursor over the specified element.
e) Setting the overflow property to scroll provides a mechanism for containing inner content without compromising specified box dimensions.
f) Span is a generic inline element that applies no inherent formatting and div. is a generic block-level element that applies no inherent formating.
g) Setting property background-repeat to repeat-y tiles the specified background-image vertically.
h) To begin a block of styles that applies to only the print media type, you use the declaration @media print, followed by an opening curly brace.
i) The text-indent property allows you to indent the first line of text in an element.
j) The three componenets of the box model are the padding, border and the margin.

5.3
Write a CSS rule that makes all text 1.5 times larger than the base font
of the system and colors the text red.

5.4
Write a CSS rule that places a background image halfway down the page,
tiling it horizontally. The image should remain in place when the user scrolls up or down.

5.5
Write a CSS rule that gives all h1 and h2 elements a padding of 0.5 ems,
a dashed border style and a margin of 0.5 ems.

5.6
Write a CSS rule that changes the color of all elements containing attribute
class = "green-Move" to green and shifts them down 25 pixels and right 15 pixels.

5.7
Make a layout template that contains a header and two columns.
Use divs for each layout component, and use float to line up the columns side by side.
Give each componenet a border and/or a background color so you can see where your divs are.

5.8
Add an embedded style sheet to the XHTML document in Fig. 5.5. The style sheet should
contain a rule that displays h1 elements in blue. In addition, create a rule that displays all links in
blue without underlining them. When the mouse hovers over a link, change the link's background color to yellow.

5.9
Make a navigation button using a div with a link inside it. Give it a border, background, and text color,
and make them change when the user hovers the mouse over the button.

Home