Jump to content

[SOLVED] li hover color not working


Vivid Lust

Recommended Posts

Hi,

 

Im making a menu, where when an li is hovered, the background and color changes. However, only the background changes and not the colour ???

Im trying to make the text color change to white when the li is hovered (not the a)

 

Please have a look at my site below, and at the css:

 

http://onest

amp.co

.uk/site (broken for SEOP reasons, please do not repost)

 

Thanks for any help you may have.

Link to comment
Share on other sites

you can fine tune the css better. But here's what I noticed at a glance. You have a 10px left right padding set for the li, unless I move the mouse directly over the a element, the a will not change color.

 

try this for now, and fine tune it after

 

get rid of line-height, padding-left & padding-right in li. add the following to the a

 

padding: 0 10px;

line-height: 2.4em;

display: block;

 

you can also get rid of height within li, if you set line-height to an element, you don't need height

Link to comment
Share on other sites

the colour on the "activelink" tab isn't white which is weird.
And you can still hover over the link without the text changing to color

 

not sure which part you are referring to. The tabs on top seems to be working fine. if you are referring to having the current tab color stay white with orange background, while the non selected tabs stay gray and black, you need to setup multiple classes, one for each tab, so that it knows which non selected tabs should be one color, while the current tab is another.

 

The other thing you want to check out is that IE6 is breaking your layout. One of which is the tabs are vertical instead of horizontal, you need to also float:left on the a element.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.