Hi all,

I have several unordered list types coming out of a CMS. For some lists, 
I want to define a new bullet. Most lists are wrapped with a div, 
unfortunately the most common (RTE output) is not. I hope there is a 
white list scenario, where I can select only those lists I wanna give 
bullets, but I lack some selector-fu.

<div class="container">
   <div class="want_this">
     <ul>
       <li>foo</li>
       <li>bar</li>
     </ul>
   </div>
</div>


<div class="container">
   <!-- RTE output - want this, no wrapper here -->
     <ul>
       <li>foo</li>
       <li>bar</li>
     </ul>
</div>


<div class="container">
   <div class="dont_want_this">
     <ul>
       <li>foo</li>
       <li>bar</li>
     </ul>
   </div>
</div>


Right now I do:

# generic white list
.container ul li {background: url(bullet.png) left 5px no-repeat;}

# black list
.container .unwanted1 li,
.container .unwanted1 li li,
.container .unwanted2 li,
.container .unwanted2 li li {background-image: none;}


Not nice, unexpected list types can pop up from any new extension to the 
CMS, and need to be blacklisted. Is there a way to select "first-level" 
ul li only? I ask for the first selector here:

# specific whitlist
.container ul li,   # make it first level only (don't select if wrapped)
.wanted1,
.wanted2 {background: url(bullet.png) left 5px no-repeat;}



Happy easter + all the best, Ingo
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to