changing color of links

Discussion in 'HTML' started by Amanda H, Mar 4, 2005.

  1. Amanda H

    Amanda H Guest

    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, Mar 4, 2005
    #1
    1. Advertising

  2. Amanda H

    Jan Faerber Guest

    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
     
    Jan Faerber, Mar 4, 2005
    #2
    1. Advertising

  3. Amanda H

    Oli Filth Guest

    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
     
    Oli Filth, May 2, 2005
    #3
  4. Amanda H

    Scotius Guest

    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.
     
    Scotius, May 2, 2005
    #4
  5. Amanda H

    Sid Ismail Guest

    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
     
    Sid Ismail, May 2, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. moondaddy
    Replies:
    3
    Views:
    38,524
    moondaddy
    Apr 28, 2004
  2. PJ6
    Replies:
    4
    Views:
    4,906
  3. Andrew Arace

    BGR Color to Java Color

    Andrew Arace, Sep 13, 2003, in forum: Java
    Replies:
    7
    Views:
    7,853
    Stephen Gilbert
    Sep 16, 2003
  4. Nospam
    Replies:
    22
    Views:
    1,223
    Beauregard T. Shagnasty
    Nov 3, 2005
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    446
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page