Different Classes For Different Link Colours

Discussion in 'CSS' started by travoholic, Jul 16, 2006.

  1. #1
    Hey guys, I'm new to the world of CSS and still trying to get my head around it.

    I think I need to create two classes or something because I need to have light coloured links and dark coloured links. Can someone tell me how to do this?

    Thanks!
    Kirsty
     
    travoholic, Jul 16, 2006 IP
  2. JosS

    JosS Guest

    Messages:
    369
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    In your stylesheet have something like this.

    a.darkblue {
    color:#FF0000;
    }

    a.lightblue {
    color:#FF000C;
    }

    then in the HTML for links do this.

    <a class="darkblue" href="page.html">DarkBlue Link</a>

    <a class="lightblue" href="page2.html">LightBlue Link</a>

    Of course, change the "#FF0000" etc to the correct colour hex codes.
     
    JosS, Jul 16, 2006 IP