Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > changing color of links

Reply
Thread Tools

changing color of links

 
 
Amanda H
Guest
Posts: n/a
 
      03-04-2005
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


 
Reply With Quote
 
 
 
 
Jan Faerber
Guest
Posts: n/a
 
      03-04-2005
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
 
 
 
 
Oli Filth
Guest
Posts: n/a
 
      05-02-2005
Scotius wrote:
> On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <(E-Mail Removed)>
> 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
 
Scotius
Guest
Posts: n/a
 
      05-02-2005
On Fri, 04 Mar 2005 20:57:28 GMT, "Amanda H" <(E-Mail Removed)>
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
 
Sid Ismail
Guest
Posts: n/a
 
      05-02-2005
On Mon, 02 May 2005 03:36:56 -0700, Scotius <(E-Mail Removed)> wrote:

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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
Visited links not changing color Felix Firefox 7 06-09-2007 08:45 AM
changing color of visited links Nospam HTML 22 11-03-2005 04:46 AM
standard way of getting color # string from drawing.color? PJ6 ASP .Net 4 09-15-2005 06:10 PM
how to convert color in style "#e6e6e6" to color object in vb.net moondaddy ASP .Net 3 04-28-2004 04:59 AM



Advertisments