Posted By

Daidaros on 12/18/09


Tagged

lists ul li Parent first-child


Versions (?)

Select just last parent list item


 / Published in: CSS
 

Painting the last parent item teal and the rest black.

  1. ul li:last-child {
  2. color: teal;
  3. }
  4.  
  5. ul li:last-child * {
  6. color: black;
  7. }
  8.  
  9. ul li ul li:last-child {
  10. color: black;
  11. }

Report this snippet  

You need to login to post a comment.