HTML CSS examples for CSS Selector:id
Select the last article inside of a section if it is odd
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> article:last-child:nth-child(odd) {<!--from www . ja v a 2 s . c o m--> color:Chartreuse; } </style> </head> <body> Lorem ipsum dolo <section> <article> Lor </article> <article> Lor </article> <article> Lor </article> </section>Lorem ipsum dolor <section> <article> Lor </article> <article> Lor </article> <article> Lor </article> <article> Lor </article> </section> </body> </html>