Avatar of Frosty555
Flag for Canada asked on

Hiding Scrollbars in IE

I am working on a webpage with a fixed content size. The content should never outgrow the page. In mozilla, the scrollbars are not shown, but in Internet Explorer they are.

I've done a fair bit of research into this and it is an issue with inernet explorer (is it a bug or a feature? who knows). Several people suggested the following CSS:

html {
overflow: auto;

which would supposedly tell IE to not display the scrollbars if it isn't necessary. I tried that, and also tried "hidden" instead of "auto", which should have told IE to hide the scrollbars no matter what. However, IE doesn't seem to respond to either.

Other solutions involved changing the 6 or 7 CSS styles related to the scrollbar to essentially make the scrollbar "invisible", by setting these styles to be the same color as the backgroudn of the page. I would be willing to try that except that IE doesn't seem to respond to any of them anymore, unlike mozilla.

I have noticed the IE *popups* do not have scrollbars if you open them with window.open('...','...','...scrollbars=no');, so perhaps the answer is in that direction. I tried tricking IE into thinking the window was a popup by setting the window.opener property, but to no avail.

It isn't suitable to have a "popup" website, ie a website where the main page is just a link that opens a popup to the main page. It is one solution but I want to see if there are any others.

HTMLWeb DevelopmentCSS

Avatar of undefined
Last Comment

8/22/2022 - Mon

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.

overflow:hidden; should hide the scroll bar.

Whilst the above suggestions will work anyway: Are your pages live yet?  I think IE displays the vertical scrollbar by default when viewing files on the hard disk.

I wonder why you think the content should never outgrow the page - that's a little different to unnecessary scrollbars.  People with very large resultions may rarely browse maximized.

Your help has saved me hundreds of hours of internet surfing.