1

I have a problem with changing the color of a bullet in a list.

So I have a list inside a <nav> tag in my HTML file:

<nav id="top-menu">
    <ul>
        <li> <a href="">Home</a> </li>
        <li><span> <a href="">Products</a> </span></li>
        <li> <a href="">Statistics</a> </li>
        <li> <a href="">Countries</a> </li>
        <li> <a href="">Settings</a> </li>
        <li> <a href="">Contacts</a> </li>
    </ul>
</nav>

So as you can see my <nav> tag has an id="top-menu". And one more thing:

<li><span> <a href="">Products</a> </span></li>

Here you can see that I put a <span> tag inside my bullet.

Here is my CSS file:

nav#top-menu {
    width: 100%;
    height: 33px;
    background-color: #696969;
    margin: 0;
    padding: 0;
}

#top-menu ul {
    display: block;
    list-style-type: none;
    width: 600px;
    margin: 0 auto;
    padding: 0;
}

#top-menu ul li {
    margin: 0;
    padding: 0;
}

Then I add this:

#top-menu ul li span {
    color: black;
}

The problem is it doesn't change anything.

In other words for now every bullet in my navigation menu is white but I want to make "Products" black.

What am I doing wrong?

Thanks.

Hemerson Varela
  • 24,034
  • 16
  • 68
  • 69
Michael
  • 15,386
  • 36
  • 94
  • 143
  • [jsFiddle demo](http://jsfiddle.net/roryokane/tWGge/) to play with – Rory O'Kane Jul 23 '13 at 20:25
  • `
  • `s add their bullets on their outside left border. Changing the color of a `` *inside* the `
  • ` will do nothing to the bullet; the `` contains only the "Products" link.
  • – Rory O'Kane Jul 23 '13 at 20:27
  • Why not simply add a class to teh specific `li` you want to change properties for? – Mike Brant Jul 23 '13 at 20:28
  • do you add a span-tag to mark it as active? in this case you might set a class like
  • ...
  • to access it via css use a 'dot' like #top-menu ul li.active – dsuess Jul 23 '13 at 20:30
  • 1
    Check the list of bullet types on [MDN `list-style-type` reference](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type). You could apply a class to the selected `
  • `, then change the `list-style-type` from `none` to `disc`, a black circle, or `square`, a black square.
  • – Rory O'Kane Jul 23 '13 at 20:31