Possible Duplicates:
CSS selector for first element with class
CSS selector to select first element of a given class
I have an HTML structure here.
<div id = "container">
<p class = "txt">abc</p>
<p class = "vs">123</p>
<p class = "txt">abc</p>
<p class = "txt">abc</p>
<p class = "vs">456</p>
</div>
How could I select the first p whose class is "vs" to set the font color to "red" via CSS selector? I mean the expectation is that only 123 is red, but 456 and abc are black.
Thanks in advance.