13.07.2015 Views

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part I: The Basicsa:visited {color: darkorchid;}The third selector that you used, the :hover dynamic pseudo-class, applies styles when the user’s mousecursor hovers over a link. When a user’s mouse cursor comes over a link, the link is colored orange.a:hover {color: orange;}Last, you used the :active dynamic pseudo-class, which applies style when the user clicks and holdsdown the mouse button on a link. When the user clicks and holds down the mouse button, the link iscolored crimson.a:active {color: crimson;}The last pseudo-class that I discuss in this chapter is the :first-child structural pseudo-class.The first-child Structural Pseudo-ClassMuch like the direct child and next sibling selectors earlier in this chapter, structural pseudo-classes areused to refer to an element’s position in a document. The :first-child structural pseudo-class appliesonly when an element is the first child of another element.IE 6 does not support the :first-child structural pseudo-class. See this book’s website atwww.wrox.com/go/beginning_css2e <strong>for</strong> compatibility help.In Figure 3-41, you see an example of the :first-child structural pseudo-class. Try it out <strong>for</strong> yourselfin the following example.Figure 3-41a102

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!