Forum How do I...?

List Marker

Anonymous
I have used a marker for a list item that will change the bullet point with an image. However, when I have a sub list that I do not want to have that image as it's bullet it will not work. I'm not sure how to over ride the content: url(someimage.jpg) with a normal bullet point.

Code for Style Sheet:
ul.checkBoxList li::marker {
   content: url(checkBox.png);
}
ul.checkBoxList li ul li {
   list-style: circle;
}


Code for HTML:

<ul class="checkBoxList>
   <li>
      Some text
      <ul>
         <li>blah blah</li>
      </ul>
   </li>
   <li>Some more text</li>
</ul>


Any suggestions?[/code]
xuehong
Hi,

You only need to add one more line in your CSS code:
ul.checkBoxList li ul li::marker { content: normal }


Xuehong
mikeday
Alternatively, you could also try making your first selector more specific, by using the child selector instead of the descendant selector:
ul.checkBoxList > li::marker {
   content: url(checkBox.png);
}