Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Stylesheet not making links properly

    I've put this in my stylesheet and the links are all correct and it takes it.. but the hover links don't show up, they just stay white with no underline? Any ideas why the rollevers don't work?

    Code:
    .footer a:link { font-family: Arial, Helvetica, sans-serif;	font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    .footer a:visited: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    .footer a:active: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    .footer a:hover: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #999999; text-decoration: underline; }

  • #2
    Regular Coder BoldUlysses's Avatar
    Join Date
    Jan 2008
    Location
    Winston-Salem, NC
    Posts
    938
    Thanks
    10
    Thanked 190 Times in 187 Posts
    Try this:

    Code:
    .footer a:link { font-family: Arial, Helvetica, sans-serif;	font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    .footer a:visited: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    .footer a:hover: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #999999; text-decoration: underline; }
    .footer a:active: { font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; color: #FFFFFF; text-decoration: none; }
    Pseudo-classes on links have to be in a certain order to work properly: Link, Visited, Hover, Active. LoVe HAte is a good mnemonic to remember the order.
    matt | design | blog

  • #3
    New Coder
    Join Date
    Oct 2008
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts
    There is an order to apply the pseudo elements, Link, Visited, Hover, Active.

    A good way to remember it is LoVe HAte..

    Mike

  • #4
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Thanks!

    That's weird though, I copied it from a tutorial that seemed pretty decent but I guess they have it in the wrong order.

  • #5
    Regular Coder
    Join Date
    Jan 2005
    Posts
    189
    Thanks
    6
    Thanked 0 Times in 0 Posts
    .footer a:active":"

    looks like that colon is what was doing it.


  •  

    Posting Permissions

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