IE displays unnecessary horizontal scroll bar in frameset
Power Supply Message
IE frame horizontal scroller.
There are many articles on the Internet reporting, and providing work around solutions for an Internet Explorer "bug” described as "IE displays unnecessary horizontal scroll bar in frameset".
It looks that the "bug" appears only when a HTML file contains the DOCTYPE declaration for XHTML 1.0. So you either need to remove the DOCTYPE declaration (which will make your file not XHTML 1.0 compliant) or use additional code to force the browser behavior with overflow commands (which will alter normal behavior and appearance of the browser).
As of 2005 Oct 20, it looks like a simple solution will completely solve the issue, without compromising the DOCTYPE declaration, and fully restoring the normal browser behavior!
Just add the XML document declaration before the XHTML 1.0 declaration, so, the beginning of your webpage file would look like:
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
Simple, isn't it?
I have to give credit to two websites that triggered my research into find a solution and indirectly provided me some clues regarding what is going on:
At www.PowerSupplies.net you will find a website with valid XHTML 1.0 documents, within frames, where browser horizontal scrollbar does not appear unless necessary.
One more thing to mention. When you add <?xml version="1.0" encoding="utf-8"?> at the beginning of the document, before DOCTYPE declaration, the content of the page will shift to the left half the width of the vertical scrollbar. Now the page will look identical with the page before adding the DOCTYPE declaration.
You can set scrolling=yes on the frame to eliminate the horizontal scrollbar. The vertical scrollbar will show whether or not the page is long enough, but the horizontal scrollbar will not show.
The downside is that both bars will show in firefox, although they will be disabled.
Author
vanish design
Date
5/21/2009 12:11:41 PM
Response topic
IE displays unnecessary horizontal scroll bar in frameset
Message
doesn't work for ie 7.
you can create another div to wrap everything... this seems to work for both ie 6 and ie 7.
Thanks, adding: worked! Thanks a lot! I don't know why it wokred, but it did. (fixed for internet expl. 6, where setting overflow values didn't help)
Author
Nico
Date
9/17/2007 3:36:56 AM
Response topic
IE displays unnecessary horizontal scroll bar in frameset
Message
Thanks you for this post. I was really simple to implement. Just remember if you are using php the use ';?> to print it out. The php returns a parsing error because of the ?> brackets.
Author
csmith
Date
3/30/2007 11:15:58 AM
Response topic
Not quite right
Message
While this "appears" to solve the problem, it's not strictly accurate.
You're changing the doctype from what it should be, ie "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
I've just added the first line as you've done here and the error still exists. The doctype needs to be the frameset version to be correct...
Soz man
Author
Shonk
Date
2/13/2007 2:51:12 PM
Response topic
Well, at least this works!
Message
THANKS!!!
Author
James
Date
12/12/2006 1:48:58 PM
Response topic
Reply: IE frame horizontal scroller
Message
Yeah.. I noticed it at times when I had small margins to work with.. Unfortunately the bug seemed to have survied on to IE 7, a browser which otherwise is a huge improvement in many respects.