SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Non-Member wulf's Avatar
    Join Date
    Jul 2006
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    active link color change

    Does anyone know how to change the active link and rollover link of specific text in a document. Not for the entire text with a:active but just for a single link.

  2. #2
    SitePoint Addict
    Join Date
    Jun 2007
    Location
    Sydney, Australia
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you are saying for one specific link, then give that link a class:

    Code:
    <a href="#" class="coollink">Link</a>
    and to style it with css:

    Code:
    a.coollink:hover
    {
    color: red;
    }
    
    a.coollink:active
    {
    color: blue;
    }
    Hope that helps

  3. #3
    Non-Member wulf's Avatar
    Join Date
    Jul 2006
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that lol it didn't work I'll try again maybe I did something wrong.

  4. #4
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean something like this?
    Code HTML4Strict:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>Untitled</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="generator" content="PSPad editor, www.pspad.com">
    <style type="text/css">
    a{color:black}
    span{color:red}
    a:hover,a:hover span{color:green}
    </style>
    </head>
    <body>
    <p><a href="#">A green link with <span>red colored</span> text</a></p>
    </body>
    </html>
    Happy ADD/ADHD with Asperger's

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you talking about :active or :hover here?

  6. #6
    Non-Member wulf's Avatar
    Join Date
    Jul 2006
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm talking about all... active hover regular link colour whatever.

    I already have the hover and link colour set for regular text but I want the link, hover, and active colour for my banner text to be different.

    Dan I like your avatar by the way

  7. #7
    Non-Member wulf's Avatar
    Join Date
    Jul 2006
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by znebojsa View Post
    if you are saying for one specific link, then give that link a class:

    Code:
    <a href="#" class="coollink">Link</a>
    and to style it with css:

    Code:
    a.coollink:hover
    {
    color: red;
    }
    
    a.coollink:active
    {
    color: blue;
    }
    Hope that helps
    thx... I was putting the class in the <font> tag instead of the <a> tag.

  8. #8
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhm, why are you using a <font> tag?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •