homepage Welcome to WebmasterWorld Guest from 54.237.38.30
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Parent DIv with bullets but child DIV without
toplisek

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4470837 posted 10:13 am on Jun 29, 2012 (gmt 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.

 

rocknbil

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



 
Msg#: 4470837 posted 4:32 pm on Jun 29, 2012 (gmt 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>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved