CSS for Current link (href)

css Singapore
  • 13 years ago

    Hi members,

    I am developing a website, i have several navigation links on each page I have applied some CSS for each link, like hover, actice, visited etc, NOW my problem is that I was the CURRENT link to look different from the other, means the page which is currently on, the link for that page on the page should look say in red color (diff from the others),
    How to do it.

    Please Help

    Aloha

  • 13 years ago
    Hi
    <a class="Link1" href="#">Style1</a>
    <a class="Link2" href="#">Style2</a>
    a.Link1
    {
    color: #666666;
    text-decoration: none;
    font-family: Tahoma;
    font-size: 8pt;
    }

    a.Link1:hover
    {
    color: Gold;
    text-decoration: none;
    font-family: Tahoma;
    font-size: 8pt;
    }

    a.Link2
    {
    color: Blue;
    text-decoration: none;
    font-family: Tahoma;
    font-size: 8pt;
    }

    a.Link2:hover
    {
    color: DarkBlue;
    text-decoration: none;
    font-family: Tahoma;
    font-size: 8pt;
    }





























Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“God could create the world in six days because he didn't have to make it compatible with the previous version.”