Vivid Lust Posted October 3, 2008 Share Posted October 3, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/ Share on other sites More sharing options...
F1Fan Posted October 3, 2008 Share Posted October 3, 2008 Please list your relevant code. Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-656571 Share on other sites More sharing options...
haku Posted October 4, 2008 Share Posted October 4, 2008 That doesn't go to the right page. Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-656863 Share on other sites More sharing options...
ifubad Posted October 4, 2008 Share Posted October 4, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-656899 Share on other sites More sharing options...
Vivid Lust Posted October 4, 2008 Author Share Posted October 4, 2008 Hi, thanks, I would never of thought of doing it that way!! hover still isn't working that well 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 Help please! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-656966 Share on other sites More sharing options...
ifubad Posted October 4, 2008 Share Posted October 4, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-657109 Share on other sites More sharing options...
ifubad Posted October 4, 2008 Share Posted October 4, 2008 the colour on the "activelink" tab isn't white which is weird. I didn't go back to look again, make sure you spell colour as color Quote Link to comment https://forums.phpfreaks.com/topic/126931-solved-li-hover-color-not-working/#findComment-657220 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.