progresser
progresser

Reputation: 43

a tag hover, active and visited don't work

I put an a tag around some text and give it an id "mainpage". Then I add CCS for "mainpage", but somehow hover, active and visted effects are not showing at all. Did I do something wrong defining them? I am a newbie and very confused...please help!

#mainpage {
    color: white; 
    text-decoration: none; 
    font-family: Georgia;
    font-size: 100px;
    color: white; 
    text-shadow: 0px 0px 1px white; 

}

#mainpage a:hover{
    color: yellow; 
    text-decoration: none; 
    font-family: Georgia;
    font-size: 100px;
    color: white; 
    text-shadow: 0px 0px 1px yellow; 
}

#mainpage a:active {
    color: yellow; 
    text-decoration: none; 
    font-family: Georgia;
    font-size: 100px;
    color: white; 
    text-shadow: 0px 0px 1px yellow; 
}

#mainpage a:visited {
    color: white; 
    text-decoration: none;
    font-family: Georgia;
    font-size: 100px;
    color: white; 
    text-shadow: 0px 0px 1px white;  
}

Upvotes: 0

Views: 355

Answers (2)

user1846747
user1846747

Reputation:

Try this...

#mainpage:hover similarly for all others...

This might work...

Upvotes: 0

Fábio Duque Silva
Fábio Duque Silva

Reputation: 2146

Change #mainpage a:hover to a#mainpage:hover, and repeat to the rest (visited, etc...)

Upvotes: 2

Related Questions