Hi
I am relatively new to (X)HTML, CSS etc. and have encountered a slight issue with a task I am currently working on.
I am using a Perl script to write an xml file which then is formatted by an xsl document with a css stylesheet (This bit all works fine).
A table is created by my code which I would like to have alternating row colours. I have succesfully applied this to most of the table by creating classes using
and the relative css
However, there is one particular entry that needs a different class name for some other formatting.
Is it possible to apply css formatting depending on a classes attributes rather than a class name?
Thanks in advance
I am relatively new to (X)HTML, CSS etc. and have encountered a slight issue with a task I am currently working on.
I am using a Perl script to write an xml file which then is formatted by an xsl document with a css stylesheet (This bit all works fine).
A table is created by my code which I would like to have alternating row colours. I have succesfully applied this to most of the table by creating classes using
Code:
<td class="r{position() mod 2}">
Code:
.r0 { background-color : #E0E0E0 }
.r1 { background-color : #D0D0D0 }
However, there is one particular entry that needs a different class name for some other formatting.
Is it possible to apply css formatting depending on a classes attributes rather than a class name?
Thanks in advance