View Full Version : changing colors


soundasleep
07-05-2003, 10:07 PM
if i have this in my head:
A:link { text-decoration: none; color:#AB8BB7}
A:visited { text-decoration: none; color:#AB8BB7}
A:hover { text-decoration:none; color:"#AB8BB7"; cursor:crosshair; }

but i want to change the color of a link still, why can't i just put <font color="#000000"> in front of my link? how do i change only the color for one specific link?

and what does the A: stand for in the css thing?
thanks.

MaGiCSuN
07-05-2003, 10:50 PM
you can put <font> infront of the link only it only works like this:

<a href="link.html"><font color="#000000">link name here</font></a>

and not like this:

<font color="#000000"><a href="link.html">link name here</a></font>

the A stands for "a href" i guess, because it has to do with links. (you know from <a href>) But i don't know if it has a special meaning or something.

Love,
Mirna

christiandude03
07-05-2003, 10:55 PM
Another way to do this is to assign a CSS class to the particular link you'd like to change:

<a href="specialpage.html" class="speciallink">whatever</a>

then below the A:link { text-.....

put:

.speciallink A:link {
color: #002395;
}
.speciallink A:visited {
color: #002200;
}

and so forth

marymaier1
07-06-2003, 12:28 AM
You have to use CSS because you can assign special colors for links in your browser, and it will go with that. The normal < font doesn't work with links because its a link, not font. Anyway, I think so. Who knows, thats just the way it is lol.

christiandude03
07-06-2003, 03:08 AM
Actually, <font should work, as long as you put it after the <a tag....

pb&j
07-06-2003, 08:23 AM
Originally posted by marymaier1
You have to use CSS because you can assign special colors for links in your browser, and it will go with that. The normal < font doesn't work with links because its a link, not font. Anyway, I think so. Who knows, thats just the way it is lol.

font tag will still work as magicsun suggested. font affects the actual text. considering the suggested example has the font tag inside of the link tags, it will affect the text within the link.

css would be the better alternative though.

soundasleep
07-28-2003, 03:45 PM
okay, for the css thing, can you possibly write out the whole thing because i don't think i'm understanding where to put it. i tried what you said, but it's not working. is it inside the A:link or is the speciallink a new subcategory?

pb&j
07-28-2003, 03:53 PM
try this...

<style type="text/css">
a {text-decoration:none; color:#ab8bb7;}
a:hover {cursor:crosshair;}
.speciallink a:link {color: #002395;}
.speciallink a:visited {color: #002200;}
.speciallink a:hover {color: #000000;}
</style>

then in your body section...

<a href="normalpage.html"> whatever </a>
<a href="specialpage.html" class="speciallink"> whatever </a>

the "a" is a reference to links such like any other tag being specified in a css.

in my example code here, i took out the other normal link references since the "a" by itself covers all of the links with that style. hover was a bit different, so i kept that part in.