954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

CSS getting a:hover to work. (#links a)

I've got the following css:

a:hover {background-color:#ff3300};
#links a
{
 
color: #FFFFFF;
 
background-color: #CC00CC;

width:6em;

heigth:6em;

padding:0.2em 1.5em;


  
}

body {background-color: #000000};


The problem is that I want the hover to work, just as what is in #links a. The problem is, it seems, is that they are not compatible with each other; the one I put on top works, the other doesn't. How can I solve this?

Thank You.

(Anohter quick question: what would be a good way to make everything float to the left?)

Pim
Junior Poster
106 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

well... i think it should work by specifying the a:hover as anither class in the #links id... like this:

#links a
{
   code
}

#links a:hover
{
   code
}
Nichito
Posting Virtuoso
1,602 posts since Mar 2007
Reputation Points: 424
Solved Threads: 57
 

It works indeed. Thanks!

Pim
Junior Poster
106 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You