IE7 Shrink-to-fit bug

巧了我就是萌 提交于 2019-12-11 00:44:48

问题


The entire page is an iframe onto another website (in this case, jquery.com just for demo purposes). I have an overlay "Hello World", and if you click on the X it minimizes it (click again it will open it).

It all works fine on IE8, Firefox, Chrome, etc...

However in IE7 it extends the white background to the entire width (see screenshot). I believe it's something to do with the shrink-to-fit or shrink-wrapping.


回答1:


Testing with IE8 compatibility mode, if on div.sidebar I remove background-color: #fff, it's fixed. Removing it makes no visible difference to IE8/Firefox.

To get rid of the page scrollbar on the right in IE7, you need to set overflow: hidden on html and/or body.




回答2:


It is the use of width:inherit on your sidebar that ie7 doesnt like. If you can set a fixed width it should be fine.



来源:https://stackoverflow.com/questions/5175341/ie7-shrink-to-fit-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!