Hello all,
This blog post is for my own reference mainly for a technique I have read and
learnt about. What I was looking for was to be able to style alternative rows a
different colour, similar to the popular layout of iTunes where the row colour
alternates between dark and light blue.
I wanted to be able to achieve this affect easily without having to add Classes
to my table for each different row manually, I wanted this to be automatic so it
can be used in CMS systems without the end user having to ammend the HTML code
on the table. I know that in the future we will not have to use JavaScript to
help us do this as the new CSS3 selectors will allow us to do this.
This is the CSS rule that will be used in the future and will obviously style
all odd table rows with the background colour red.