How to put different styles on two identical <cite> elements?
5 answers
There are ways to do this using CSS, but it will not be compatible with IE6. As long as you agree with this, you can do this:
p cite {
font-weight: bold;
}
p cite + cite {
font-style: italic;
font-weight: normal;
}
The reason for this is that '+' chooses the brother of any of the quotes given. Since the relationship between the sisters goes only forward in the DOM, you will only select the second (or nth, where n> 1) cite tag.
Unfortunately + does not work with IE6.
+5