changing color of links

A

Amanda H

I have a page set up like a table and some of the cells in the table have a
dark background and some have a white background. I need the links in the
dark background to be a different color. I'm used to setting link color in
the body tag. What's the best way to have different link colors on
different parts of the same page?

Thanks for the help. - Amanda
 
J

Jan Faerber

Amanda H ... output:
I have a page set up like a table and some of the cells in the table have
a
dark background and some have a white background. I need the links in the
dark background to be a different color. I'm used to setting link color
in
the body tag. What's the best way to have different link colors on
different parts of the same page?

Thanks for the help. - Amanda


#box:visited { color:#FFFF99 }
#box:active { color:#FFFF99 }
#box:hover { color:#FFFF99 }
#box:link { color:#FFFF99 }
#box:focus { color:#FFFF99 }

<a id="box" href="/dir">alt.html</a>


That is an example for one style. For other styles use other ids with other
css assignments.
 
O

Oli Filth

Scotius said:
I think if you use " <FONT FACE= ... SIZE= ... COLOR=...>" and
then close the font tag, using it again later for another color, you
that should work.

Or you could write decent HTML, using CSS.
 
S

Scotius

I have a page set up like a table and some of the cells in the table have a
dark background and some have a white background. I need the links in the
dark background to be a different color. I'm used to setting link color in
the body tag. What's the best way to have different link colors on
different parts of the same page?

Thanks for the help. - Amanda

I think if you use " <FONT FACE= ... SIZE= ... COLOR=...>" and
then close the font tag, using it again later for another color, you
that should work.
 
S

Sid Ismail

: On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <[email protected]>
: wrote:
:
: >I have a page set up like a table and some of the cells in the table have a
: >dark background and some have a white background. I need the links in the
: >dark background to be a different color. I'm used to setting link color in
: >the body tag. What's the best way to have different link colors on
: >different parts of the same page?
: >
: >Thanks for the help. - Amanda
: >
:
: I think if you use " <FONT FACE= ... SIZE= ... COLOR=...>" and
: then close the font tag, using it again later for another color, you
: that should work.


Oh, shoosh with that <font... nonsense.

A.blue:visited {color: #003399;}
A.blue:link {color: #003399;}
A.blue:hover {color: red;}
A.blue:active {color: #003399;}

A.white:visited {color: #ffffff;}
A.white:link {color: #ffffff;}
A.white:hover {color: red;}
A.white:active {color: #ffffff;}

and then -

<a href="blah1.html" class="blue">Blue Link</a>
<a href="blah2.html" class="white">White Link</a>

Preferably specify background-color also.

Sid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top