How do i get access to the <html> element in javascript?
Posted
by kwyjibo
on Stack Overflow
See other posts from Stack Overflow
or by kwyjibo
Published on 2010-06-09T00:41:01Z
Indexed on
2010/06/09
0:52 UTC
Read the original article
Hit count: 206
IE displays a default scrollbar on the page, which appears even if the content is too short to require a scrollbar.
The typical way to remove this scrollbar (if not needed), is to add this to your css:
HTML {
height: 100%;
overflow: auto;
}
I'm trying to do the same thing in javascript (without requiring that in my CSS), but i can't seem to find a way to get access to the html element. I know i can access the body element with document.body, but that doesn't seem to be sufficient, i need the wrapping html element.
Any tips?
© Stack Overflow or respective owner