lets say you have this:
<ul>
<li></li>
<li>
<ul>
<li></li>
<li></li>
</ul>
</li>
<li></li>
<ul>
Now if you DONT need IE6 compatibility (reference at Quirksmode) you can have the following css
ul li { background:#fff; }
ul>li { background:#f0f; }
The >
is a direct children operator, so in this case only the first level of li
s will be purple.
Hope this helps