View Full Version : CSS hover code, doesnt change :o

08-09-2007, 07:32 PM
Im trying to change my menu blocks when the user hovers over them, both the background colour and the text colour. I found a tutorial and so i followed it but the menu doesnt change when i hover over it.

This is the code for the menu blocks up top:

#header ul a {
line-height: 1em;
padding: .2em;
border: 1px solid #000000;
float: left;
text-transform: uppercase;
text-decoration: none;
color: #aae2ff;
background: #1f1f1f;
font-size: 1em;

So i added this to my css as an example:

#header ul a:hover {
border: 2px solid #000000;
background: #333333
color: #ffffff;

But when i hover it doesnt change. Is anyone able to tell me what im doing wrong? I can supply my full css / html if that helps.


08-09-2007, 08:03 PM
It may be the case that you need li in there like this:

#header ul li a

#header ul li a:hover

But can you show your HTML?

08-09-2007, 09:35 PM
also, you are missing a ; after your background color change in your hover code....sometimes small stuff like that changes everything.