开发者

Why is this div's width stretching across the page in IE7?

If you look at this page in IE7: [redacted] If you hover over one of the lines in the chart, you can see the little yellow popup stretches across the page. It shouldn't and doesn't in other browsers. Can somebody tell me why this is happening in IE7?

For what it's worth, I can fix it by specifying a width for that div wit开发者_开发知识库h CSS. I'm just curious why it's happening 'cause the client will ask!


Ok... firstly - that code is clearly very old. I can tell, because it's sniffing to see whether or not your browser is IE4 (yes, that's a four). Unfortunately, it considers that any IE browser is IE4...

If it detects IE4, it then goes on to set the width of the layer it creates to be the same width as the window - which is why it's so horribly wide for you.

As you've discovered, you should be able to add some CSS to override that width yourself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜