developers deliver the appropriate CSS rules to the correct browser as needed,
thereby helping to work around the deficiency in the browser.
Fixes in IE7
After five years without a major release of IE, almost any major release of the
browser could be considered an improvement. With the release of IE7, let’s take a
look at what is implemented.
IE7’s Selector Support
Child selectors, adjacent sibling selectors, and attribute selectors that that are a
problem in IE6 are now fixed in IE7.
Figures 17 and 18 showcase the child selector demonstrated previously, but this
time in IE6 and IE7, respectively.
Releasing CSS 25
Releasing CSS 26
Figure 17. Child selectors not working in IE6
Figure 18. Child selectors are now working in IE7
Figures 19 and 20 showcase the adjacent sibling selectors demonstrated previously,
but this time in IE6 and IE7, respectively.
Releasing CSS 27
Figure 19. Adjacent sibling selectors not available in IE6
Releasing CSS 28
Figure 20. Adjacent sibling selectors available in IE7
Attribute selectors are working in IE7. Figures 21 and 22 showcase how IE6 and
IE7 handle a few attribute selectors based on the following CSS code:
#attr1 a[href] {
text-decoration: none;
color: green;
}
#attr2 a[href="csscookbook.com"] {
text-decoration: none;
color: green;
}
#attr3 a[title~="digital"] {
text-decoration: none;
color: green;
}
#attr4 a[title|="digital"] {
text-decoration: none;
color: green;
}
The markup used in Figures 21 and 22 is as follows:
<h2 title align="left">Attribute Selector [attribute]</h2>
<ul id="attr1">
<li><a name="not" title="">Not a working link to CSSCookbook.com</a></li>
<li><a href="http://my.home.page/">Link to CSSCookbook.com</a></li>
</ul>
<h2>Attribute Selector [attribute=val]</h2>
Releasing CSS 29

Get Releasing CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.