Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-08-2009
Members
 
Join Date: Aug 2004
Location: Goa
Posts: 38
How do I override my CSS link colors?

Hello friends,

I am creating a page using CSS where i am trying to use CSS to create the colors for the links on the page as a whole and at the same time there are many other links too but they have dark background and i want to change those links to some other colors, but don't know which code should i use it. Does anyone know what code i need to use to override my CSS link colors
Reply With Quote
  #2  
Old 08-08-2009
Member
 
Join Date: Jan 2009
Posts: 133
How do I override my CSS link colors?

If you want to have override of CSS link colors then you need to use the following code

Code:
a1:link.selector_name { color: #colorcode; text-decoration: none; }
a1:visited.selector_name { color: #colorcode; text-decoration: none; }
a1:hover.selector_name { color: #colorcode; text-decoration: none; }
a1:active.selector_name { color: #colorcode; text-decoration: none; }
After that you can put any code which you want to style this links.

Then for the links you want to change only some code which are as follows.

HTML Code:
<p><a class="selector_name" href="URL Name" title="Mouseover Description">Text Name1</a></p>
Name your 'selector_name' whatever you like.
Reply With Quote
  #3  
Old 08-08-2009
Member
 
Join Date: Jan 2009
Posts: 126
Override CSS link colors

There are many way but according to me you should use the following code directly on your page and this will override the link definition in your css.

HTML Code:
<a href="your url link " style="color:#colorcode;">Actual Link</a>
If you want want to use the above code you can make the changes in your css code and add another style definition:

HTML Code:
.link2 a:link, .link2 a:hover; .link2 a:active { color:#color code; }
and in your web page use this code:

HTML Code:
<a href="URl Link " class="link2">Actual Link</a>
This way if you want to tweak the color you just need to change the css definition and don't have to touch your web page.
Reply With Quote
  #4  
Old 08-08-2009
Member
 
Join Date: Jan 2009
Posts: 86
How do I override my CSS link colors?

There is no need to change do any thing in your HTML coding you just need to add a class attribute to this link for example <a class="special_Link" href="...">URL Name to be displayed</a>

Then add rules in your CSS file like

a.special_Link:link { color: white; }
a.special_Link:visited { color: black; }
a.special_Link:hover { color: yellow; }
Reply With Quote
  #5  
Old 10-08-2009
Member
 
Join Date: Feb 2009
Posts: 96
Re: How do I override my CSS link colors?

did you try right click/properties/background or even font color?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How do I override my CSS link colors?"
Thread Thread Starter Forum Replies Last Post
Changing the flag colors in Outlook 2010 which results in different colors before you open the email? 1-matra Windows Software 5 09-04-2012 05:12 PM
How to override ToString() method in C#? Linoo Software Development 5 23-02-2010 07:54 PM
How to use Override annotation in java? MAHESA Software Development 4 30-01-2010 08:25 PM
Confused between override and new in C# KANAN14 Software Development 3 26-11-2009 06:47 AM
How to override vista permissions Reckon Operating Systems 3 01-06-2009 11:16 AM


All times are GMT +5.5. The time now is 04:36 PM.