SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: link colors

  1. #1
    SitePoint Zealot
    Join Date
    May 2000
    Location
    Duluth, MN USA
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kyank-
    Thanks alot. I guessed CSS would probably do it, but most of the info I found was kind of confusing. I don't think confusion over the links will be a problem since the active and visted colors will be the same and show up fine on both backgrounds. It is just the unvisited link that I was having problems with, and I hope using a light shade of blue and normal blue will work. I know what you mean though--one of my web pet peeves is links that are meant to be obvious but don't look like links and text that looks like a link but isn't ! But you guys can be the judge. 'Cause once I get a few things done on the site I'd like to have it reviewed here (already got 3+ reviews in). Thanks again .
    --Bill

    ------------------
    Lake Superior Smokin' Brews
    www.smokinbrews.com

  2. #2
    SitePoint Zealot
    Join Date
    May 2000
    Location
    Duluth, MN USA
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to(or I guess I should ask how can I) have two different link colors on a page without using frames and have both colors change after they have been used? I have a dark border on my site with lighter colored links, and the main area is white and needs darker colored links. Currently I am just using style=..... in the anchor tag, but the link stays the color I select. I tried putting the links in a table and changing the cell color, but that looked bad. Thanks for any help.
    --Bill

    ------------------
    Lake Superior Smokin' Brews
    www.smokinbrews.com

  3. #3
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Cascading Style Sheets (CSS) will let you do exactly what you're after. Here's some sample code:

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">code/font><HR><pre>
    &lt;STYLE TYPE="text/css"&gt;
    &lt;!--

    A.alternate { color: #FF0000 }
    A.alternate:visited { color: #00FF00 }
    A.alternate:active { color: #0000FF }

    --&gt;
    &lt;/STYLE&gt;

    &lt;A HREF="..."&gt; A normal link &lt;/A&gt;

    &lt;A CLASS=alternate HREF="..."&gt; A special-colored link &lt;/A&gt;

    [/code]

    Set the colors in the &lt;STYLE&gt; code to suit your preferences, then mark any link you want to use these alternate colors with CLASS=alternate.

    Just a note of caution: you should have a very good reason for using more than one color scheme for links on your page. In most cases, this will only confuse the user.

    Let me know if you have any questions!

    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  4. #4
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also try

    a.alternate:hover {color blah blah blah

    this will create a mouse over affect. You can make the text change font, size, make it underlined, or change its color when the mouse is over it.

    Chris

  5. #5
    SitePoint Member
    Join Date
    Apr 2000
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But "hover" only work in internet explorer though.

  6. #6
    SitePoint Guru
    Join Date
    Sep 1999
    Location
    Singapore
    Posts
    854
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote/font><HR>Originally posted by Puzzler:
    But "hover" only work in internet explorer though.<HR></BLOCKQUOTE>

    And Mozilla...

  7. #7
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't work in netscape. But it works in netscape 6.0 and it doesn't hurt netscape so you're giving IE people a treat that doesn't hurt. Hmm hope that made sense

    Chris

  8. #8
    SitePoint Zealot
    Join Date
    May 2000
    Location
    Duluth, MN USA
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I added the code to my webpages. Works fine in IE, but just gives the unfollowed link color and the active link when clicked on in Netscape, even Netscape 6. I put the code between my head tags. Is that where it should go? Thanks
    --Bill

    ------------------
    Lake Superior Smokin' Brews
    www.smokinbrews.com

  9. #9
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Can you give us a URL so we can check your code?


    ------------------
    -Kevin Yank.
    http://www.SitePoint.com/
    Helping Small Business Grow Online!

  10. #10
    SitePoint Zealot
    Join Date
    May 2000
    Location
    Duluth, MN USA
    Posts
    166
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the URL http://www.smokinbrews.com/brewshop.htm

    That's the only page I have setup that way. On the other pages I have a shade of blue that more or less shows up on both backgrounds, but it is a bit light on the white background. Thanks again
    --Bill

    ------------------
    Lake Superior Smokin' Brews
    www.smokinbrews.com


Bookmarks

Posting Permissions

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