Background should apply only for first-child li only not other ul li's

css

Solution

Give class to your parent `UL`. Write like this:

HTML

<ul class="parent">
    <li>one</li>
    <li>one
        <ul>
            <li>two</li>
            <li>two</li>
            <li>two</li>
        </ul>    
    </li>
    <li>one</li>
</ul>

CSS

.parent > li:first-child{background-color:#ccc}

Check this for more http://jsfiddle.net/fX9Gy/27/

Problem

i need only first 'li' element with gray background color. But first 'li' of each 'ul li' my background color gray is applying. Background color should apply only for the first li(My Example). http://jsfiddle.net/fX9Gy/ Can anybody please solve the prob. Thanks

Original source