Can I change the styles of the last p only with CSS?

Posted by Luli on Stack Overflow See other posts from Stack Overflow or by Luli
Published on 2010-04-18T07:26:38Z Indexed on 2010/04/18 7:33 UTC
Read the original article Hit count: 197

Filed under:

I've got several p tags in the content of a page. I want to change the color of the last one before the div that hold them. Can I do this just with CSS?

<div class="text">
   <p>P One</p>
   <p>P Two</p>
   <p>P Three</p>
   <p>P Four (this is the one I'd like to modify)</p>
</div>

Thanks

© Stack Overflow or respective owner

Related posts about css