nth-child Support in the Major Players
Posted on July 12th, 2008 | 6 Comments »
After reading an article over at the SiteCrafting Blah Blah Blog about different ways to alternate table row colors, it occurred to me that the nth-child approach was not mentioned. Way back in 2004 I had implemented a ridiculous (hindsight is 20/20) proof-of-concept around implementing tables without using the <table> tag. However ridiculous the prototype might have been, one touch I added was the use of the nth-child pseudo-class to display alternating table rows in a different color. Here’s what I wrote about that at the time:
This rule is actually a part of the CSS3 selector set, and if your browser was capable of rendering it correctly (I’m willing to bet it isn’t, at least at the time of posting) you’d see alternate background colors on the table rows (alternating between white and light gray).
Remembering that old proof-of-concept today, I decided to have another look at it. I was disappointed to find that even in the latest version of Firefox (version 3), over four years later, the alternating row colors were nowhere to be found. I was happy to see, though, that the latest versions of Opera (9.51 at the time of writing) and Safari (3.1.2 at the time of writing) actually do display the alternating table row colors. As one might guess, IE7 falls in the Firefox camp on this one.
It’s unfortunate that only half of the major players support this useful feature, but I’m guessing we’ll see support added in Firefox 3.1, of which there is a first alpha targeted for release at the end of this month, since that particular release is meant to include a slew of CSS support geared toward Acid3 compliance. Furthermore, one can hope nth-child support will show up in IE8, but that may be the least likely scenario between the two.
Tags: CSS, CSS3, Firefox, Firefox 3, Firefox 3.1, IE7, IE8, nth-child, Opera, Safari, Selectors, Web Development, Web Standards
6 Responses
Using
Mozilla Firefox 3.0 on
Linux
The nightlies have had full support for the CSS3 selectors since over a month ago
http://www.css3.info/firefox-31-is-the-latest-to-pass-our-selectors-test/
Using
Mozilla Firefox 3.0.1 on
Windows XP
Thanks for the tip, Exec. I don’t know if I’m ready to jump over to the Firefox 3.1 nightlies just yet, since the alpha isn’t even out yet. But it’s good to know the support will be there when a stabler version is released.
Using
Opera 8.53 on
Windows XP
You’re in point of fact a good webmaster. The website loading velocity is incredible. It seems that you are doing any distinctive trick. Moreover, The contents are masterpiece. you have done a magnificent job on this subject!
Using
Internet Explorer 8.0 on
Windows NT
I like what you guys are up too. Such clever work and reporting! Keep up the excellent works guys I have incorporated you guys to my blogroll. I think it will improve the value of my site
.
Using
Safari 532.2 on
Mac OS X
I must have your layout tell me where you got it PLEEEAAAASSSEE!!
Using
Mozilla Firefox 3.0 on
Windows XP
Polnische Hochzeitsband MOTET NRW Polnische Band NRW, deutsch polnische band, polnische hochzeitsband, polnisch russische band deutsch polnische hochzeitsband, polnisch deutsche band, hochzeitsband deutsch polnisch, band deutsch polnisch