How to change font color inside nav element?

Posted by user2924752 on Stack Overflow See other posts from Stack Overflow or by user2924752
Published on 2013-10-27T09:49:45Z Indexed on 2013/10/27 9:53 UTC
Read the original article Hit count: 353

Filed under:
|
|
|

I have a element and I want to change the color of the links within it, but all other links on my page are styled using the following CSS:

a:link {

    color:#22b14c;
    text-decoration:none;
    }

and here is the nav:

<nav id="Nav">
        <a href="index.html">Home</a> |
        <a href="Gallery.html">Library</a> |
        <a href="Contact.html">Contact</a> |
        <a href="About.html">About</a>
</nav>

and the nav css:

#Nav {

    margin-top: 20px;
    background-color: #000000;
    color: #f2f2f2;
    font-size: 40px;
    font-family: "Calibri";
    text-align: center;
    }

I tried a span inside the nav element but that didn't work. How can I change the color for these links only inside the element?

© Stack Overflow or respective owner

Related posts about html

Related posts about css