Results 1 to 7 of 7

Thread: Hyperlink color

  1. #1
    Hyperlink color

    Member Since
    Jul 09, 2012
    Posts
    8
    Hyperlink color
    Hi, I am trying to figure out why my links keep changing colors even though I am trying to properly format them in the css style in the <head>. See attached screen shot and link to page.

    here is how the code looks:

    <style type="text/css">
    a:link {color: #CCFFCC;} /* unvisited link */
    a:link {color: #CCFFCC;} /* visited link */
    a:link {color: white;} /* mouse over link */
    a:link {color: #CCFFCC;} /* selected link */
    p {color: white; }
    p {font-family: "Georgia", Times, serif; }
    body {background-color: black; }
    ....

    this is indeed making the color of the unvisited link the proper color, but once I visit a link it goes to a dark blue and I can't figure out how to change that to where it is stable. Also, the mouseover doesn't change it to white.

    Also, I can't figure out what is making the weird A A with the accent after the "length" of the songs... Thanks in advance for any help!

    Music


  2. #2
    Hyperlink color
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Moved to a more appropriate forum.

    The problem here is simple - you're setting the colour of links four different times. Here's the excerpt:
    Code:
    a:link {color: #CCFFCC;} /* unvisited link */
    a:link {color: #CCFFCC;} /* visited link */
    a:link {color: white;} /* mouse over link */
    a:link {color: #CCFFCC;} /* selected link */
    As you can see, you're using the same property over and over. Thus, you're only styling the colour of the link but not the visited, active or hover values. These are the properties you want:
    Code:
    A:link
    A:visited
    A:active
    A:hover
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  3. #3
    Hyperlink color

    Member Since
    Jul 09, 2012
    Posts
    8
    Thanks for the prompt response! I will try that out and see if I can solve this problem.

    Any idea what causes that weird looking "A" after the Length description? That screenshot is actually an iframe reading from this page:
    Playlist

    Thanks!

  4. #4
    Hyperlink color
    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,398
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Nothing's "causing" per se other than the fact that those characters exist in the source of the page. Remove them and all will be well.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  5. #5
    Hyperlink color

    Member Since
    Jul 09, 2012
    Posts
    8
    I changed the css script as follows and I am still having the same issue:

    Music

    A:link {color: #CCFFCC;} /* unvisited link */
    A:visited {color: #CCFFCC;} /* visited link */
    A:hover {color: white;} /* mouse over link */
    A:active {color: #CCFFCC;} /* selected link */

    Sorry, I am still new to a lot of this stuff so I tend to need a lot of explanation. Thanks!

  6. #6
    Hyperlink color
    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,189
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3
    Here ya go: CSS Styling Links

    The "Try it Yourself" is great for you play with and understand how it's working..
    --
    Regards
    ...Ashwin



    Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.

  7. #7
    Hyperlink color

    Member Since
    Mar 07, 2009
    Location
    Brisbane Qld Aust
    Posts
    17
    Specs:
    27 inch, iMac, Mountain Lion
    Quote Originally Posted by wkonigsmark View Post
    I changed the css script as follows and I am still having the same issue:

    Music

    A:link {color: #CCFFCC;} /* unvisited link */
    A:visited {color: #CCFFCC;} /* visited link */
    A:hover {color: white;} /* mouse over link */
    A:active {color: #CCFFCC;} /* selected link */

    Sorry, I am still new to a lot of this stuff so I tend to need a lot of explanation. Thanks!
    As an example of one of my external css files links, try this below;

    /* Links formatting */
    a:link, a:visited, a:active {
    font-family: Verdana, sans-serif;
    color: #1e90ff; /* DodgerBlue */
    font-size: 17px;
    font-weight: 500;
    text-decoration: underline;
    }
    a:hover {
    font-family: Verdana, sans-serif;
    color: #ff0000; /* Red */
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    }

    Remember, it’s as Raz0rEdge says, “Try it yourself,” it can be a lot of phunn,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Redefine Hyperlink Color in MS Word Mac 2011
    By PixelMage in forum OS X - Apps and Games
    Replies: 0
    Last Post: 11-20-2013, 03:19 PM
  2. Keynote hyperlink
    By dstanrev in forum OS X - Operating System
    Replies: 1
    Last Post: 05-29-2012, 10:31 PM
  3. PCs can print color fine to HP Color LaserJet 5550, but iMacs can't
    By amozart in forum Other Hardware and Peripherals
    Replies: 2
    Last Post: 01-21-2009, 10:48 PM
  4. Color laser printer for proofing color
    By jamiefriggin in forum Other Hardware and Peripherals
    Replies: 0
    Last Post: 08-10-2007, 03:13 PM
  5. Hyperlink to a Picture
    By greyS60 in forum Web Design and Hosting
    Replies: 1
    Last Post: 08-28-2006, 06:13 PM

Posting Permissions

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