html - CSS - target the first element with class -


html:

<p class=menu_top>title</p> <p class=menu_top>order</p> <p class=menu_top>position</p> <p class=menu_top>number</p> 

how can target first element?

use :first-child pseudo-class.

.menu_top:first-child {     your: rules; } 

http://jsfiddle.net/ukjck/1/


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -