CSS & Hyperlink Help.

Discussion in 'HTML & Website Design' started by rain7, May 2, 2009.

  1. #1
    I have this problem that I want to use CSS on Hyperlink.
    I make a css class. But now I want to use another color for hyperlink.

    a:link {
    color: #FFFFFF;
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    }
    a:hover {
    text-decoration: none;
    }
    a:active {
    text-decoration: none;
    }



    This is color: #FFFFFF; here.
    But I want to many colours on my website.
    So how can I creat another Hyper link CSS?


    I have one problem more that I want to use same color.

    a:link
    a:visited
    a:hover
    a:active

    these type colors are not same when I click a link then visited color will change. I dont want to this.


    Please tell Me.
    I am new on your forum. I hope you will help me.

    I am waiting for your reply.
     
    rain7, May 2, 2009 IP
  2. sweeks

    sweeks Member

    Messages:
    191
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #2
    This may help you:

    
    .custom a: {font-weight:400;text-decoration:none;color:#004e77;}
    .custom a:link {font-weight:400;text-decoration:none;color:#004e77;}
    .custom a:visited {font-weight:400;text-decoration:none;color:#004e77;}
    .custom a:hover {font-weight:400;color:#004e77;text-decoration:underline;}
    Code (markup):
    You can create a new class applied to either the new links or the div which will contain the links for example:

    <div class="custom"><a href="#">My New Links in different colours</a></div>
    Code (markup):
    Of course you will have to edit the styles to your liking. Hope this helps.
     
    sweeks, May 2, 2009 IP
    CrazyJugglerDrummer likes this.
  3. ahmedeqbal

    ahmedeqbal Active Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #3
    a:link {
    text-decoration: none;
    color: #FFFFFF;
    }

    a:visited {
    text-decoration: none;
    color: #FFFFFF; <<(Put your colors here)
    }

    a:hover, a:active {
    color: #FFF; <<(Put your colors here)
    text-decoration: none;
    }
     
    ahmedeqbal, May 2, 2009 IP
  4. rain7

    rain7 Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    sweeks, ahmedeqbal Thanks alote. You both solve my problem. :)

    I have done my work.
    Once again Thank You.
     
    rain7, May 2, 2009 IP
  5. sweeks

    sweeks Member

    Messages:
    191
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    35
    #5
    No problem at all :)
     
    sweeks, May 2, 2009 IP