Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - changing color of links

 
Thread Tools Search this Thread
Old 03-04-2005, 08:57 PM   #1
Default changing color of links


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




Amanda H
  Reply With Quote
Old 03-04-2005, 09:27 PM   #2
Jan Faerber
 
Posts: n/a
Default Re: changing color of links

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.




--
Jan

http://html.janfaerber.com
  Reply With Quote
Old 05-02-2005, 09:38 AM   #3
Oli Filth
 
Posts: n/a
Default Re: changing color of links

Scotius wrote:
> On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <>
> 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?
>>

> 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.

--
Oli
  Reply With Quote
Old 05-02-2005, 11:36 AM   #4
Scotius
 
Posts: n/a
Default Re: changing color of links

On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <>
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.
  Reply With Quote
Old 05-02-2005, 07:43 PM   #5
Sid Ismail
 
Posts: n/a
Default Re: changing color of links

On Mon, 02 May 2005 03:36:56 -0700, Scotius <> wrote:

: On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <>
: 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


  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump