Power Supply Industry News Knowledge is Power ™




Keyword
Original Message
Topic 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:

http://www.noscope.com/journal/2004/02/horizontal_scrollbar_bug

http://www.torn.be/kazza/tutz/xhtml/4/xhtml_hor_scrlbar_results_en.html

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.

Darius Livescu
Darius@PowerSupplies.net
 
Author Darius Livescu 
Date 10/21/2005 2:25:41 PM 
      

 

Responses
Response topic Scrolling=YES 
Message
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.


content...

#container{
position:relative;
width:99%;
height:auto;
}
#container1{
position:relative;
padding:10px 10px 0px 10px; (i wanted padding...)
width:99%;
}

this worked for me...
 
Author abc 
Date 10/9/2008 7:41:50 PM 
 
Response topic Horizontal scroll bar 
Message
Thanks alot. That was a smart find.
 
Author Rohit 
Date 4/5/2008 7:35:01 PM 
 
Response topic IE horizontal scrollbar bug 
Message
Thanks!
 
Author kitus 
Date 2/22/2008 12:27:53 PM 
 
Response topic Thanks 
Message This works perfectly, thank you! 
Author Rob B 
Date 11/12/2007 11:10:38 PM 
 
Response topic This works! 
Message
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.

Anyways, very good tip.. thanks
 
Author Mikael Franzen 
Date 12/10/2006 6:37:53 PM 
 
Response topic Thanks! 
Message
Solved my problem. Thank you for this article!
 
Author curefan.hu 
Date 11/26/2006 4:45:30 PM 
 
Response topic That was really helpful 
Message
Thanks a lot!
 
Author MBS 
Date 10/12/2006 7:16:50 AM 
 
Response topic IE Scroll bar 
Message
Good work!
 
Author Dan 
Date 6/25/2006 9:24:25 PM 
 

 




 

2700 currently registered users receiving weekly email news. 7000 registered since 2002.
Copyright © SMPS Power Supplies™. All rights reserved.