Evaluation

Disclaimer: This page is incomplete. The information and thoughts here have not all been tested. I welcome from anyone who has some more information, but please don't attack me if I'm wrong.

The ideal solution would:

In a few weeks time I'm hoping to add more detail about the workarounds and their relative merits. I need to do some more testing and learn some more JavaScript first.

Solution 1

This works very effectively and restricts itself to Internet Explorer 6.0. I haven't yet found a way to prevent it from applying when the page is not in a frame.

Solution 2

This is an excellent solution for pages which will resize well.

This can be made to apply only to Internet Explorer 6.0 and a page within a frameset by using JavaScript. However, I think that if the page contains long elements which do not wrap onto the next line, the user will never be able to see them because there is no horizontal scroll bar. I haven't tested this yet.

Solution 3

Internet Explorer allows the user to make the window narrower until it is only 100 pixels wide. On a screen of 640 x 480, the body width needs to be reduced to around 65% in order for the horizontal scroll bar not to appear in this narrow window. This is an unacceptably low value, because it makes the page look very blank when the window is wider.

I use a value of 94%, which gives a reasonable result at a variety of screen resolutions. This value has been chosen because it works for a full-screen window at a resolution of 640 x 480.

This works pretty well and can be made to apply only to Internet Explorer 6.0 and a page within a frameset by using JavaScript. However, it requires different width values depending on the size of the window.

Solution 4

This works very well. I have tried it in Internet Explorer 6.0, Netscape 7.01 and Mozilla 1.3.1 and in all three it gives the same result as scrolling="auto". However, my understanding of the standards is that scrolling="yes" should always put scroll bars on the window. In browsers which do comply with the standards, it may therefore look less good. I have some more testing to do here.

Solution 5

This works very well. However, it makes it impossible for the user to use the Back button on their browser. The half second hang is used so that a quick user can go back by pressing Back twice.

JavaScript Detection

In solutions 2 and 3, changes are made to the stylesheet because there is no way of making the change in standard HTML. I use some JavaScript code which checks the browser and version, and only makes the change if it is Internet Explorer 6.0.

My JavaScript code changes the width only for Internet Explorer 6.0, not for any future version. I am hoping that the bug will be fixed in 6.1. Come back to this site once that is released.

The code works by first checking whether the browser is Internet Explorer 6.0. If this is so, it checks if the page is being opened in a frame. If this is so, it makes the change.

The code would be even better if it knew or could predict whether the vertical scroll bar was visible in a particular Internet Explorer browser window. As far as I know, this is not possible, but I'd be very happy to hear from someone who has a method.