Results 1 to 3 of 3

Thread: hover link (simple) nvm - solved.

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default hover link (simple) nvm - solved.

    Hi, how do you get the link to be red when you hover over the link and green when you don't hover over the link whether you have visited the link or not?

    I am using:
    Code:
    <style type="text/css">
    a:link {
       color:red;
       }
    a:hover {
       color: #ffcc33;
       }
    a:visited { 
    	color:purple;
    	}</style>
    EDIT: Fixed. I looked through the forums and discovered that order is more important than I thought when dealing with CSS. The code should have looked like this:
    Code:
    <style type="text/css">
    a:link {
       color:red;
       }
    a:visited { 
    	color:purple;
    	}
    a:hover {
       color: #ffcc33;
       }</style>
    Last edited by james438; 08-24-2007 at 04:38 PM.

  2. #2
    Join Date
    Jul 2007
    Location
    California
    Posts
    177
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by james438 View Post
    Hi, how do you get the link to be red when you hover over the link and green when you don't hover over the link whether you have visited the link or not?

    I am using:
    Code:
    <style type="text/css">
    a:link {
       color:red;
       }
    a:hover {
       color: #ffcc33;
       }
    a:visited { 
    	color:red;
    	}</style>
    Just make the a:link and a:visited the same color... then the hover will be the only thing that can change it

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    That is not true. At least it is not true in Opera, FF, or IE7. Here is a link to the thread where I found the answer.

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
  •