it may be worth taking a look at CSS 2.0. I haven't tried to this in it just yet but have a look at the link below. It should tell you what you need to know. Looks to me like it may do what you're looking for with some fairly simple code (my apologies if it doesn't work): :)
btw- 8.4 and 8.5 are the two sections you should read.