This is a good way to have the ?¬? rst
item in a list be bold, for example (ul + li {font-weight:bold;).
(Adjacent sibling selectors work in SCBs and IE 7, but not IE6).
ATTRIBUTE SELECTORS
Attribute selectors use the attributes of the tag. This is another way
to target different CSS at similar elements; as long as there is some
difference between attributes on the tags you are trying to target,
you can apply different rules to those tags. However, this interesting
capability is of limited use, since neither IE 6 nor even the new,
HOW CSS WORKS 47
improved IE 7 supports them. So for now, we can only use attribute
selectors to enhance the experience of viewers with SCBs.
This rule
img[title] {border: 2px solid blue;}
causes any img with a title attribute, like this

to have a blue, two-pixel border around it; it doesn??™t matter what
the value of the title attribute is, just that there is one. You might
use such a style to indicate to the user that if he points at this image,
a tooltip (pop-up text generated by the title attribute) displays. It??™s
common practice to duplicate the alt and title attribute values??”
the
tag text displays if the image does not load, or can be read
by a screen reader, and the title causes a tooltip to appear if the
user points at the image.
Pages:
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79