Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Single link color change 1

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Hi all

<body bgcolor=&quot;#cdf9fc&quot; text=&quot;#000000&quot; link=&quot;#0000ff&quot; vlink=&quot;#0000ff&quot; alink=&quot;#ff000ff&quot; body marginwidth=&quot;0&quot; marginheight=&quot;0&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

</body>

I have a single link within the body that needs to show as white, (it's on a dark background), as opposed to the colour defined in the body statement.

What is the correct code, please?

Thanks in advance.
HTH

Chris [pc2]
 
Code:
<a href=&quot;where.html&quot;><font color=&quot;white&quot;>bla bla</font></a>
---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Study this example:

<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<TITLE></TITLE>
</HEAD>
<body bgcolor=&quot;#000000&quot; text=&quot;#22FF22&quot; link=&quot;#FFFFFF&quot; vlink=&quot;#00FFFF&quot; alink=&quot;#FF000FF&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>

<a href=&quot;new.htm&quot;>link text</a>

<br>
<br>
<br>
<font color=&quot;#FFFFFF&quot;>link (This attribute indicates the default color of hyperlinks that have
not yet been activated.) #FFFFFF</font><br>
<font color=&quot;#00FFFF&quot;>vlink (This attribute indicates the default color of hyperlinks that have
already been activated.) #00FFFF</font><br>
<font color=&quot;#FF000FF&quot;>alink (This attribute indicates the color that a hyperlink assumes when
it is activated or clicked on. This state is usually only temporary until the activation event
ends.) #FF000FF</font><br>

text (When this attribute is present it indicates the default color of the document
text. This color can be overridden locally by specifying a FONT COLOR value.) #22FF22

</BODY>
</HTML>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Cian

Thanks for the links.

How would you code the equivalent of:-

<font color=#ffffff size=&quot;3&quot; face=&quot;Times&quot;></font>

in the style sheet?

a.effect1:link {color: ; text-decoration: none; }
a.effect1:active {color: ; text-decoration: none; }
a.effect1:visited {color: ; text-decoration: none; }
a.effect1:hover {color: red; text-decoration: none; }
???
HTH

Chris [pc2]
 
Hi Chris,

Quite simply:

a.effect1:link {color: #ffffff; text-decoration: underline;
font-style: Times; font-size: 12pt}
a.effect1:active {color: #ffffff; text-decoration: underline;
font-style: Times; font-size: 12pt}
a.effect1:visited {color: #ffffff; text-decoration: underline;
font-style: Times; font-size: 12pt}
a.effect1:hover {color: #ffffff; text-decoration: none;
font-style: Times; font-size: 12pt}

the last one there &quot;hover&quot; you could maybe change it to a different colour like red or blue!
And text-decoration, i would recommend that you underline the link, it usually looks best. Then you can remove it on hover if you wish.
I just stuck in size as well in case you need that.
There's MANY more styles you can add.
You should check out the W3C website for more info,

Hope that helps.




É

endamcg-logo1b.gif

 
Oh, one mistake. I didn't spot the font size you put in your question so I just added 12pt to the code. I am not sure how they match up but you can play with it.
you can specify the sizes with 'pt' or 'px' for example:
font-size: 12pt
font-size: 12px



É

endamcg-logo1b.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top