Prev | Current Page 65 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

This approach has the added bene?¬? t
of making your style sheet simpler too.
HOW CSS WORKS 45
In summary, you can use multiple id attributes in a page, but each
one must have a unique value (name) to identify it. You can apply a
particular class name to as many tags as needed.
Specialized Selectors
Although not an of?¬? cial CSS category, these ???specialized??? selectors
let you target markup in ways different from the selectors we have
seen so far. With the exception of the * (star) selector, the following
selectors effectively examine the markup and apply themselves
if certain conditions are true??”for example, if one particular type
of tag follows another type of tag sequentially. These selectors
offer some powerful capabilities, but are not well supported by
older browsers, especially IE, including IE6. IE7, however, is much
improved in this regard. If you want to test any browser??™s capability
to support pseudo-classes, I have put up a test page at www.
stylinwithcss.com/chapter_2/code/pseudo_tests.htm. This page will
allow you to see at a glance how well the browser you are using supports
these ???specialized??? selectors.
THE UNIVERSAL SELECTOR
The * universal selector (commonly known as the star selector)
means ???anything,??? so if you use
* {color:green;}
in your style sheet, all type will be green, except where you specify it
to be different in other rules.


Pages:
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77