SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Feb 2000
    0 Post(s)
    0 Thread(s)
    I was wondering if it is possible to set different sets of link colors on one page.
    Basically I have a background with a dark colored bar on the left and white space to the right. I want to have different link colors for each side. is this possible?
    Does this make sense?
    Thank you!

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Lancaster, Ca. USA
    1 Post(s)
    0 Thread(s)
    /*light color links */
    A.light {color=blue}
    A.light:hover {color=purple}
    A.light:active {color=purple}
    A.light:visited {color=red}

    /* dark color links */
    A.dark:visited {color=white} on and so forth


    Then in your <A> tags you would put class="light" or class="dark" depending on where the link was.

    Wayne Luke

    The Majormud Encyclopedia -
    Come Play one of the hottest games on the net.

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 1999
    Minneapolis, MN, USA
    0 Post(s)
    0 Thread(s)
    I also had to do that sorta thing (have different color navigation links). The only problem I had with that was that Netscape doesn't support that part of CSS (from what I've noticed. Correct me if I'm wrong.), but instead displays the link color in the body tag. So make sure you have a color that is readable in both the dark and light.

    Just what I've noticed. Please correct me if I'm wrong about this support thing - because I'd love to know how to fix that.

    John Schrom
    Webmaster - 4Webmasters

  4. #4
    SitePoint Community Guest
    What JRS said has a bit o merit since, keep in mind, SOME people use browsers that are not javascript capable (or they turn javascript off). Wouldn't it be nice if everyone used the same thing.

    *day dreams for a second* ... ahhhhh

  5. #5
    Ng Soon Seng
    SitePoint Community Guest

    It's easy, you can have as many color links as you like on a page.

    Just try this, it works for me.

    Exp: <A HREF=""><FONT COLOR="#FF0000">Unitronics</FONT></A>
    This code will produce a red text link.

    If you have for example a black background and want a yellow text link, then change to:
    <A HREF=""><FONT COLOR="#FFFF00">Unitronics</FONT></A>

    By looking at the code you can choose any link color as you like to match the background color.

    This works with NC and IE I have a page on color selection, if you need assistance, visit my site and get the best color with the code generated for you.

    Hope this helps as I am often at website reviews section and happen to just cross over to website design section to browse around.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts