CSS issue: link rendered incorrectly

a {
    color: #000;
}

a:hover {
    text-decoration: none;
    color: #fff;
}

      

This is the code I am using. But none of the links I have on my pages hear. Instead, they respect this:

#menu li, a {
    text-align: center;
    display: block;
    float: left;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size:1.2em;
    color: #575757;
    text-decoration: none;
    list-style: none;
}

      

Therefore, many links are skewed as they all float to the left and anywhere.
The code for the links themselves is not wrapped in any way. At least not in a way to explain my mistakes.

<div id="footer">
  <p><center>Copyright 2008 - <a href="index.php">G.S.B.V. Pugilice</a></center></p>
</div>

      

This bit of code gives me two lines instead of one, the link floats to the left on the second line.

+1


source to share


1 answer


I think you may be misunderstanding how selectors work.

#menu li, a { ... }

      

Styles any descendant of the li element with the id #menu and any found elsewhere.



Did you really intend: -

#menu li, #menu a {...}

      

?

+8


source







All Articles