Welcome to WebmasterWorld Guest from 54.196.208.6

Forum Moderators: not2easy

Message Too Old, No Replies

Parent DIv with bullets but child DIV without

     
10:13 am on Jun 29, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 994
votes: 0


I like to set in the correct way parent LI and child DIV without bullet images. How to eliminate bullet image even parent DIV has defined LI bullets all the time?

When I add new child DIV's it will still show bullet images.

Parent DIV:
#parent li {
background: url("../bullets/bullet.gif") no-repeat scroll 0 -5px transparent;
list-style-type: none;
margin-top: 4px;
padding-bottom: 4px;
padding-left:7px;
padding-right: 7px;
text-align: left;
}

Child DIV:
#child li {
display: block;
padding: 3px 6px 0 0;
list-style: none;
}

Can be some setting to eliminate bullets inside child DIV?

Issue is that I have set list-style: none; but still show parent bullet.
4:32 pm on June 29, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


HTML please. :-) There should be no reason to have a "child div" - the child should be a nested UL, right?

Parent DIV:
#parent li {
background: url("../bullets/bullet.gif") no-repeat scroll 0 -5px transparent;
list-style: none; /* though list-style-type should still work */
margin-top: 4px;
padding-bottom: 4px;
padding-left:7px;
padding-right: 7px;
text-align: left;
}

#parent li ul li {
display: block;
padding: 3px 6px 0 0;
list-style: none;
}

<ul id="parent">
<li>first item
<ul>
<li>First nested</li>
<li>Second nested</li>
</ul>
</li> <!-- end first item -->
</ul>