The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Link styles

  • # May 16, 2009 at 12:40 pm

    Hi, I´m having this big problem, and that its that i have a horizontal menu, and its background color is a green gradient, and over that I have some links and I want them to be white. Thats not the problem, the problem its that I also have a vertical menu that has the background set on white, but I want the links be a different color from white, so how can I make this possible?
    How can I have two different styles of color links?


    # May 16, 2009 at 12:57 pm

    Yes. That is the magic of selectors.

    That tells all links to be white

    a { color: white; }

    If you give an ID to your navigations:

    You can tell the links to be different colors depending on what ID (#) they are in:

    #topnav a { color: white; }
    #sidenava { color: white; }
    # May 16, 2009 at 1:14 pm

    That was a really quick reply!! Thanks :D
    Its working :P

    # May 16, 2009 at 1:53 pm


    You’re welcome.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed