Forum Home
Press F1
 
Thread ID: 116548 2011-03-09 04:00:00 Another CSS question - IE7 hover Tony (4941) Press F1
Post ID Timestamp Content User
1184632 2011-03-09 04:00:00 I know there are some issues with :hover in IE7, but I've can't find a reference to this one:

CSS:


#Mydiv: { width:200px; height:200px; border:1px solid green;}

#Mydiv:hover { border: 1px solid red;}

HTML:


<div id="Mydiv"></div>


Mydiv will get some content via Javascript. With FF and most other browsers, it works as you might expect - you mouse over MyDiv and the border colour changes.

With IE7, the color only changes if you mouse exactly on the border - if you move inside the box, nothing happens.

Am I doing something wrong, or have I discovered yet another idocy with IE?
Tony (4941)
1184633 2011-03-09 19:42:00 bumpity-bump-bump Tony (4941)
1184634 2011-03-09 19:53:00 Dont think many people will be using IE7 anyway. Since IE9 will be released on the 14th Speedy Gonzales (78)
1184635 2011-03-09 20:01:00 Dont think many people will be using IE7 anyway. Since IE9 will be released on the 14thI'm not so sure about that. However it will be interesting to see if the problem disappears.

D'oh! I've also just discovered I should have said IE8 not IE7. :blush:
Tony (4941)
1184636 2011-03-10 19:26:00 Hey Speedy, I just looked at Google Analytics for the website,and these are the stats:

IE8: 69%
IE7: 24%
IE6: 6%
IE9: <1%

The scary thing is that 6% are still using IE6! But the fact that 24% are using IE7 shows that just because there is a new browser imminent, not everyone will be changing, so I still have to worry about the older ones.
Tony (4941)
1184637 2011-03-10 19:43:00 Just change to 8 and put us out of our misery. Cicero (40)
1184638 2011-03-10 23:07:00 Just change to 8 and put us out of our misery.Who, me? I'm already on 8, but many of the people who will be viewing the website are not. Thanks for the constructive comment... Tony (4941)
1184639 2011-03-11 00:02:00 Hey Speedy, I just looked at Google Analytics for the website,and these are the stats:

IE8: 69%
IE7: 24%
IE6: 6%
IE9: <1%

The scary thing is that 6% are still using IE6! But the fact that 24% are using IE7 shows that just because there is a new browser imminent, not everyone will be changing, so I still have to worry about the older ones.

No other browsers like FF in those stats and it adds up to 100%. Did you just filter the stats for IE only?
Snorkbox (15764)
1184640 2011-03-11 00:06:00 Yes that is just the IE percentages - I got them in response to Speedy's comment, and the fact that it is an IE problem I am trying to solve. Tony (4941)
1184641 2011-03-11 02:34:00 Im guessing that IE is treating the content as seperate to the div? Which it shouldnt but it is IE so it will do whatever it likes.

Seeing as the box isnt that big you could use a background image (gif) with transparent center and the border, I know it's a bit messy but should mean that as long as the mouse is in the div the colour would change. Pretty sure CSS lets you do hovers for background...
hueybot3000 (3646)
1 2