Need CSS guru to help , how to style list items (with same class) individually.
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-06-17T11:12:44Z
Indexed on
2010/06/17
11:23 UTC
Read the original article
Hit count: 287
css
|first-child
Hi all , please help me to style this list , I need to set different background image for each list item, but class are same.
<ul>
<li class="sameforall">menu 1</li>
<li class="sameforall">menu 2</li>
<li class="sameforall">menu 3</li>
<li class="sameforall">menu 4</li>
</ul>
I know this one , but it works only for fist item :(
ul:first-child li{
/*my css*/
}
© Stack Overflow or respective owner