Pseudo-class Descendant Selectors in IE 6
How to use pseudo-class descendant selectors in IE 6
This is a rollover This is the hidden content
If you mouse over the "This is a rollover" text above, "This is the hidden content" should appear (even in IE 6!), even though it's a CSS-only solution. In the past, I thought this wasn't possible, because IE 6 doesn't support pseudo-class descendant selectors and I would use JavaScript as a workaround. However, I was wrong. Thanks to Trent Richardson, I learned there is a way to make IE 6 recognize pseudo-class descendant selectors.
The HTML:
<p><a href="/" class="rollover">This is a rollover <span class="tooltip">This is the hidden content.</span></a></p>
The CSS:
a.rollover span {
display: none;
}
/*background:; ie hack, something must be changed in a for ie to execute it*/
a.rollover:hover {
background:;
}
a.rollover:hover span.tooltip {
display: block;
Last update—11 June 2008
Recent Blog Posts- Live blogging Google I/O: HTML5 status update
- Live blogging Google I/O: Optimize every bit of your site serving and web pages with Page Speed
- Live blogging from Google I/O: SEO site advice from the experts
- Developing web apps fro the Chrome web store
- Live blogging Google I/O: Google Analytics APIs: End to end