1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need Help With CSS

Discussion in 'HTML & JavaScript' started by The Scarlet Pimp, Nov 6, 2008.

  1. The Scarlet Pimp

    The Scarlet Pimp Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 2, 2008
    Messages:
    788
    Likes Received:
    3,120
    Occupation:
    Chair moistener.
    Location:
    Cyberspace
    i can't figure out why this doesn't work. i know how to change the color of
    the text, but i can't change the color of the hyperlink:

    when someone hovers over the data cell i want the link to change from blue
    to red. so far only regular text will change color but not hyperlinks... :confused:

    ---

    td:hover {
    color:#FFFFFF;
    a:hover color:#FF0000;
    }

    ---
     
  2. WickednDivine

    WickednDivine Executive VIP Premium Member

    Joined:
    Jul 29, 2008
    Messages:
    468
    Likes Received:
    344
    Code:
    td:hover{
    color: #FFFFFF;
    }
    
    td:hover a:hover {
    color: #FF0000;
    }
    
    
    haven't actually tested that, but that's the general idea. you can't embed a "a:hover" within another class like you are doing
     
    • Thanks Thanks x 1
  3. typo619

    typo619 Newbie

    Joined:
    May 16, 2008
    Messages:
    21
    Likes Received:
    3
    Occupation:
    developer
    Location:
    Cali
    Or you can try

    Code:
    a:link {
    	color: #FF0000;
    	text-decoration: none;
    	}
    a:visited {
    	text-decoration: none;
    	color: #333333;
    	}
    a:hover {
    	text-decoration: underline;
    	color: #00FF00;
    	}
    a:active {
    	text-decoration: none;
    	color: #333333;
    	}
    
    Depending on what you want to accomplish.
     
  4. xplicit

    xplicit BANNED BANNED

    Joined:
    Jul 21, 2008
    Messages:
    1,119
    Likes Received:
    1,053
    I think both these replies covered it, but wanted to point you to a site with tutorials in case you need anything else.

    Code:
    http://v1.reinspire.net/blog/2005/09/19/css_hyperlink_styling/
     
  5. The Scarlet Pimp

    The Scarlet Pimp Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 2, 2008
    Messages:
    788
    Likes Received:
    3,120
    Occupation:
    Chair moistener.
    Location:
    Cyberspace
    thanx guys... this is what i finally got and it works fine!
    (could never figure out how to fix the multi-embed problem. :D)

    td:hover a:link{
    color:#FF0000;
    backgroundcolor:#FFFFFF;
    text-decoration:none;
    }


    td:hover {
    color:#FF0000;
    background-color:#FFFFFF;
    }
     
  6. dirtbag

    dirtbag Senior Member

    Joined:
    Jul 24, 2008
    Messages:
    990
    Likes Received:
    525
    always look for missing { } ; : in your css, then typos, that will cure half your css ailments...