IE displays unnecessary horizontal scroll bar in frameset
Author
Darius Livescu
Date
10/21/2005 2:25:41 PM
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.