link color

admin

Administrator
Staff member
this might be a dumb question but is there a way to change the color of a link on the page without changing ALL the link colors on that page??<br />
<br />
can i do it with style sheets? <br />
<br />
i need to change the color of the links in a column of a table since it looks funny with the background of the column...<br />
<br />
any ideas?<!--content-->You have to use an in-line style code for that 1 particular link. Or you can use style classes for groups of links.<br />
<br />
Check out the CSS tutorial on <!-- w --><a class="postlink" href="http://www.htmlgoodies.com">www.htmlgoodies.com</a><!-- w --><br />
<br />
Good Luck!<!--content-->The tutorial:<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlgoodies.com/tutors/ie_style.html">http://www.htmlgoodies.com/tutors/ie_style.html</a><!-- m --><!--content-->ok so that helped me in coding the style sheet, but how do i make it apply to only one portion of the table...<br />
<br />
i have this in my <td> :<br />
<br />
<style type="text/css"><br />
<!--<br />
a:link { color: #FFFFFF}<br />
a:visited { color: #000066}<br />
--><br />
</style><br />
<br />
thats all i really want it to do but now its making the links white on every part of the page not just that <td><!--content-->Hi,<br />
I'm not sure if this will work in all browsers but it works in mine:<br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.thehotweb.net"><font color="#000080">test</font></a><br />
or this using style:<br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.thehotweb.net" style="color: #000080">test</a><br />
Hope this helps and hope I'm right.<br />
Good Luck,<br />
Paul<!--content-->Sure, that code will color the link.<br />
However, the problem is when trying to add hover and visited. As far as I know, it is not possible to apply this to the element style, as the : in a:hover creates a problem.<br />
On the other hand, it might be possible to define two different A styles in the document style.<br />
<br />
If anyone knows then please tell, this really annoys me..<br />
<br />
-aslefo<!--content-->What about this one?<br />
<br />
style menu : individueel instellen:<br />
<A HREF=http://www.htmlforums.com/archive/index.php/"Photographsnl.htm" TARGET="hoofdscherm"><FONT FACE="Arial" SIZE=2 COLOR="#ffffff" onmouseover="this.style.color='#00FFFF'" onmouseout="this.style.color='#FFFF00'"><B>Joop's Foto's</A></FONT><br><!--content-->hacker,<br />
what about the vlink color?? maybe i can just change that for the whole page in the body tag...the link color itself is the main thing i need changed anyways i'll try out the suggestions you guys made and keep u posted.<br />
<br />
thanks a lot!!<!--content-->yep that did it!<br />
thanks again :)<!--content-->yeah my code didn't do that nor did it apply the hover, it was just a simple solution. Anyway great you found the anwser.<br />
Paul<!--content-->just add something like this into your CSS:<br />
<br />
.mylink{text-decoration:none color:#whatever}<br />
<br />
and make your links look something like:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"wherever.net" class="mylink">Your Link</a><!--content--><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><br />
<br />
<html><br />
<head><br />
<title>Untitled</title><br />
<style><br />
a.swiss:link {color: red; text-decoration: none;}<br />
a.swiss:visited{color: red; text-decoration: none;}<br />
a.swiss:active{color: red; text-decoration: none;}<br />
a.swiss:hover {color: yellow; text-decoration: none;}<br />
<br />
a.cheese:link {color: red; text-decoration: none;}<br />
a.cheese:visited{color: red; text-decoration: none;}<br />
a.cheese:active{color: red; text-decoration: none;}<br />
a.cheese:hover {color: #cccccc; text-decoration: none;}<br />
<br />
a.wow:link {color: red; text-decoration: none;}<br />
a.wow:visited{color: red; text-decoration: none;}<br />
a.wow:active{color: red; text-decoration: none;}<br />
a.wow:hover{color: blue; text-decoration: none;}<br />
</STYLE> <br />
<br />
<br />
</style><br />
</head><br />
<br />
<body><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"zonk.html" class="swiss">swiss</a>&nbsp;&nbsp;&nbsp;<br />
<a href=http://www.htmlforums.com/archive/index.php/"zonk.html" class="cheese">cheese</a>&nbsp;&nbsp;&nbsp;<br />
<a href=http://www.htmlforums.com/archive/index.php/"zonk.html" class="wow">w o w</A><br />
<br />
</body><br />
</html><!--content-->
 
Back
Top