iamjpg / Ez-Background-Resize

Resizable full-browser background image using jQuery. Implementation requires no CSS.
http://johnpatrickgiven.com/jquery/background-resize/
89 stars 32 forks source link

IE7 CSS cascade bug #9

Closed weisbartb closed 6 months ago

weisbartb commented 13 years ago

Fixes a very obscure error in IE7. Under some cases that overflow:auto will cascade into other elements causing scroll bars to appear on various elements.

Test case done at 1920x1080 in IE7 using a div with width:100%;height:60px;overflow:none; with a child element with a height of 75.

Before the fix a horizontal and vertical scroll bar would appear. After the fix the scroll bars vanished. The body scroll bars still existed and the rest of the document works fine.

Fix removes the hidding/showing of overflow on the body element and replaces it with a bar size calculation if scroll bars are present on the page.