I use several tables and I want to shade alternating table rows. The common way to do so is
.t tbody > tr:nth-child(odd) > td:nth-child(1) {
background-color:#f0f0f0;
}
This works in Firefox, Chrome, and Safari, but IE does not support the nth-child()
pseudo class. Short of tagging each row manually with a class, is there an alternative cross browser method to accomplish this? I wish to avoid this because it will consume space on the embedded system.
Note: This page is served from an embedded system acting as a WiFi Access Point. That means, that the client will be connected to the embedded system, and not to the internet. Means no JS libraries.
EDIT: IE 9 will support nth-child()
, but I need to be able to support IE 7 and 8 as well