0

This works fine:

ul.tabs a.current:hover {
    background-position: -420px -31px;  
    color:#000; 
}   

but this dosent

ul.tabs a.commentArea.current:hover {
     background-position: -420px -31px; 
     color:#000; 
    }

Im getting the indication that I wrote this style incorrectly, as the css isnt working on my element. How would I write this correctly...proper syntax?

2
  • Your edited CSS code is correct. Do you actually have <a class="commentArea current">? Commented Dec 30, 2010 at 0:01
  • Ive got it working now...had to remove the space before :hover Commented Dec 30, 2010 at 0:44

3 Answers 3

1

It has to be

a.commentArea:hover

selectors targeting the same element must not be separated by spaces.

Sign up to request clarification or add additional context in comments.

Comments

0

no space before :hover

ul.tabs a.commentArea:hover

Comments

0
ul.tabs a.commentArea:hover

Remove the space before :hover

See http://www.w3schools.com/CSS/css_pseudo_classes.asp

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.