Tuesday, February 5th, 2008
Keeping Your Elements’ Kids in Line with Offspring
A List Apart: Articles: Keeping Your Elements’ Kids in Line with Offspring
It occurred to me that classes resembling pseudo-classes could be added automagically through DOM Scripting. For instance, what if the first child of every element got the class first-child? And, to round things out, what about only-child and last-child as well?
By Laura @ 1:55 pm in Cascading Style Sheets, Javascript







