Body overflow hidden problem in Internet Explorer 7

gpergo picture gpergo · Dec 14, 2010 · Viewed 10.5k times · Source

I need to apply the overflow:hidden to the body of a page with CSS, but is doesn't work in Internet Explorer 7. I've read about this topic but always with divs. How can I make this work to Internet Explorer 7? I don't mind using jQuery.

Answer

Pradeep Singh picture Pradeep Singh · Dec 14, 2010

See here: http://www.artmov.com/dev/snippets/apply-overflow-x-overflow-y-to-body-in-ie7-ie6-84/:

Applying overflow-x:hidden or overflow-y:hidden; to the body element of the document will not work. The overflow-x:hidden or overflow-y:hidden must be applied to the html element, not body element.