You are reading...

December 17th

Note: Not every browser support every CSS property. And there plenty of vendor-specific properties that will not work on other browsers. Keep that in mind. To my knowledge, all smartphone browsers support most CSS3 properties.

Clients love zebra patterned lists and tables. They love it, something to do with readability. Whatever. With CSS3, it’s a snap. For instance, in a typical table:

table tr td:nth-child(2n) {
background:#eee;
padding:10px 0;
}

This will add a background and padding every even number of cells. N equals all whole numbers.


table tr td:nth-child(2n + 1) {
padding:10px 0;
}

And just to make things tidy, this is how to do odds. No need to add “alt” classes.

In the future, no longer will one exchange barbs with a client over the effectiveness of zebra tables. Just do it and collect paycheck.

Go home
blog comments powered by Disqus

This is my Twitter status linked to my Facebook status. Annoying, huh?

Tumblr : the other white short format blog.

Japanese Scientist + Poop
Friday, 2 October 2009, 1:27 pm

New Jersey Netski?
Thursday, 17 September 2009, 6:00 pm

All hail Federbot!
Monday, 14 September 2009, 6:17 am

Bill Bavasi is to the M's Fox is to Firefly
Wednesday, 9 September 2009, 9:11 pm

Your Mets starting LF...
Wednesday, 19 August 2009, 5:33 pm

I'd disagree, but then my blog design is essentially a bachelor pad
Tuesday, 18 August 2009, 10:39 pm

Officer, there's an old lady peering into our house
Saturday, 15 August 2009, 7:06 am