Grow your CSS skills. Land your dream job.

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?

    Thanks
    Jose.

    # May 16, 2009 at 12:57 pm

    Yes. That is the magic of selectors.

    That tells all links to be white

    Code:
    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:

    Code:
    #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

    Excellent.

    You’re welcome.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".