By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,247 Members | 1,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,247 IT Pros & Developers. It's quick & easy.

Help with list item css

P: n/a
I have a list item css as follows that I use on some pages:
li {
list-style-type: square;
list-style-image: url(Media/Bullet_A.gif);
}

Im trying to have no image on another list with a class:

<li class="menuA"><a href="" title="D">5 Steps to Fitness</a></li>

The css:
.menuA {
list-style-type: none;
}

The image is there untill i hover and it goes away permenently.

I dont want it there at all

The entire CSS for this menu is:
#navcontainer {
width: 200px;
float: right;
list-style-type: none;
}

#navcontainer ul
{
margin-left: 0;
padding-left: 0;
list-style-type: none;
font-family: Arial, Helvetica, sans-serif;
}
#navcontainer li
{
list-style-type: none;
}
#navcontainer a
{
display: block;
padding: 3px;
width: 160px;
background-color: #999999;
border-bottom: 1px solid #eee;
}
#navcontainer a:link, #navlist a:visited
{
color: #EEE;
text-decoration: none;
}
#navcontainer a:hover
{
background-color: #369;
color: #fff;
}
.menuA {
list-style-type: none;
}

The whole div is:

<div id="navcontainer">
<ul id="navlist">
<li class="menuA"><a href="" title="D">5 Steps to Fitness</a></li>
<li class="menuA"><a href="file:///C" title="A">Nutrition</a></li>
<li class="menuA"><a href="file:///C" title="B">Cardio</a></li>
<li class="menuA"><a href="file:///C" title="C">Resistance
Training</a></li>
<li class="menuA"><a href="" title="D">Supplementation</a></li>
</ul>
</div>
Thanks
Mike
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 16 Jan 2004 21:45:33 -0500, Mike <mi**@nospam.net> wrote:
I have a list item css as follows that I use on some pages:
li {
list-style-type: square;
list-style-image: url(Media/Bullet_A.gif);
}

Im trying to have no image on another list with a class:

<li class="menuA"><a href="" title="D">5 Steps to Fitness</a></li>

The css:
.menuA {
list-style-type: none;
}

The image is there untill i hover and it goes away permenently.

I dont want it there at all


You've changed the list-style-type property in the second style, but the
list-style-image is inherited. That's what happens.

Set list-style-image: none in the second style and you're set.

And check out http://www.w3.org/TR/CSS2/propidx.html
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.