Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
Appendix C CSS Property Reference^619

Table C.1Cascading style sheet properties (continued)


Property
width
Common Values: A numeric value (pxor em), percentage, or auto (default)
Usage: Configures the width of an element.
Example: width:60%;
z-index
Common Values: A numeric value; the default value is 0
Usage: The stack order of an element on a Web page. A higher value will display in front of elements
with lower values.
Example: z-index:10;

Table C.2 Pseudo-classes Used with the Anchor Element


Pseudo-class Usage
link Default state for a hyperlink that has not been clicked (visited)
Example: a:link {color:#00FF00; }
visited Default state for a visited link
Example: a:visited {color:#003300; }
focus Triggered when the link has focus (for example, by pressing the Tab key on the keyboard)
Example: a:focus {color:#FFFF66; }
hover Triggered when the mouse moves over the hyperlink
Example: a:hover {color:#000000; }
active Triggered when the hyperlink is actually clicked (or the Enter key is pressed when the hyper-
link has focus)
Example: a:active {color:#CCCCCC; }
Free download pdf