Eric Posted January 12, 2006 Share Posted January 12, 2006 When you mouse-over some text, it's supposed to change from white to yellow. But in IE is screws up.This works correctly in Mozilla Firefox and Opera.But fails in Internet Explorer, wow what a supprise </sarcasm>IE is known for it's problems >_>Here's the CSS: .nav1 { background-color: #9F9F9F; color: #FFFFFF; text-align: center; padding-left: 3px; padding-right: 3px;}.nav2 { background-color: #6F6F6F; color: #FFFFFF; text-align: center; padding-left: 3px; padding-right: 3px;}a:link.navlink,a:visited.navlink,a:active.navlink { color: #FFFFFF; text-decoration: none; background-color: inherit; font-weight: bold;}a:hover.navlink { color: #FFFF00; text-decoration: none; background-color: inherit; font-weight: bold;} Any help? Link to comment Share on other sites More sharing options...
aspnetguy Posted January 12, 2006 Share Posted January 12, 2006 just for kicks try replacing background-color: inherit with an actual color. I have my suspicions that IE doesn't recognize it correctly. Link to comment Share on other sites More sharing options...
aspnetguy Posted January 12, 2006 Share Posted January 12, 2006 You're not by chance using a Mac are you??? IE 5 for Mac has an inheritance problem for backgrounds on floated objects. Link to comment Share on other sites More sharing options...
Eric Posted January 12, 2006 Author Share Posted January 12, 2006 just for kicks try replacing background-color: inherit with an actual color. I have my suspicions that IE doesn't recognize it correctly.<{POST_SNAPBACK}> I can't really set a background color for obvious reasons (it has to blend in with the color of the box, either .nav1 or .nav2 I used background-color: transparent before but when W3C decided to label a 'warning' to it I switched to inheritYou're not by chance using a Mac are you??? IE 5 for Mac has an inheritance problem for backgrounds on floated objects.<{POST_SNAPBACK}> Nope, Windows XP and IE6 Link to comment Share on other sites More sharing options...
aspnetguy Posted January 12, 2006 Share Posted January 12, 2006 I can't really set a background color for obvious reasons (it has to blend in with the color of the box, either .nav1 or .nav2 I used background-color: transparent before but when W3C decided to label a 'warning' to it I switched to inheritI meant do it temporarily to see if that solved your problem...that way you know if IE is having troubles with it.Actually if you take out the background-color line all together the background will not change, try that. Link to comment Share on other sites More sharing options...
Eric Posted January 12, 2006 Author Share Posted January 12, 2006 You get a warning then, saying that you have a color with no background-color :)And it did work before when I had a transparent background, but damn W3C warns that nowIs there anything else you could suggest, other than having two sepeate classes (a:hover.navlink1 and a:hover.navlink2) with background colors?All this extra code can make a website run slower >_> Link to comment Share on other sites More sharing options...
aspnetguy Posted January 12, 2006 Share Posted January 12, 2006 Sorry can't suggest anything else...I always do that even with the warning...seems stupid to me.Why should I have to define a background-color everytime I use a color or vice versa??? Just because it is standard it does mean it is the most logical way...Not a good attitude I know, but I rarely validate my CSS...XHTML always though. Link to comment Share on other sites More sharing options...
Eric Posted January 12, 2006 Author Share Posted January 12, 2006 Oh well, I just ended up doing what I said, having two sepeate CSS bits with the two different background colors. It works and no warnings.Thanks for your help. Link to comment Share on other sites More sharing options...
Jonas Posted January 12, 2006 Share Posted January 12, 2006 I don't know if it matters, but I always write:a.class_name:hovernota:hover.class_nameCould make a difference, I dunno know. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now