Feature: Scroll bar all the time

Discussion of features in Mozilla Firefox
Locked
User avatar
Nate
Posts: 55
Joined: November 5th, 2002, 1:46 pm
Location: Washington State, USA
Contact:

Feature: Scroll bar all the time

Post by Nate »

If the page you are viewing is too short to need a scroll bar -- the scroll bar should still be there, but disabled.

Why, you ask? Because then sites which have a centered layout won't shift left or right depending on the page length.

Here is an example: http://www.thenoodleincident.com/tutorials/box_lesson/basic_centered.html. Expand your browser height so that there is no scroll bar and notice that the box shifts to the right. Shrink the browser so a scroll bar is required and the box shifts left.

On "centered" web sites that have a short index page linking to longer articles, the whole site appears to shift left or right depending on the length of the article that you click on.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Re: Feature: Scroll bar all the time

Post by Stefan »

Nate wrote:Why, you ask? Because then sites which have a centered layout won't shift left or right depending on the page length.


This seems like that would be something best left up to the webdesigner.
If he likes to he can easily make the page have a scrollbar using simple CSS.

IMO it also look really ugly to add scrollbars whne they are not needed.
Eg If I add the main of a webpage in a <div> with it's own scrollbar I sure as hell don't want another blank scollbar that doesn't do anything next to my <div>s scollbar.
User avatar
Nate
Posts: 55
Joined: November 5th, 2002, 1:46 pm
Location: Washington State, USA
Contact:

Post by Nate »

Stefan wrote:This seems like that would be something best left up to the webdesigner.
If he likes to he can easily make the page have a scrollbar using simple CSS.


That's a nice workaround, but it shouldn't be necessary. A scroll bar is a user-interface element that is part of the user agent. It shouldn't be specified in CSS, for example, some user agents don't have scroll bars at all, while others may render it in radically different ways.

Web designers generally don't do this because: IE displays the "disabled scrollbar" as in my original suggestion; and Opera calculates centering positions as if there was a scroll bar even when the scroll bar is not currently displayed. Only in Phoenix (and maybe Mozilla) does the "shifting" effect occur.

Opera's way of doing it would address your concern of not wanting to see a second scrollbar. As for your site design, you may consider that a majority of visitors to your site are "sure as hell" seeing that second scroll bar if they're using IE.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

Nate wrote:Web designers generally don't do this because: IE displays the "disabled scrollbar" as in my original suggestion;


And I would give my right arm (well not really) to stop stupid IE to do that on eg this site I'm working on right now
http://hem.bredband.net/husste/krav/ny/base.html

and Opera calculates centering positions as if there was a scroll bar even when the scroll bar is not currently displayed.


Which makes webpges look very crappy indeed when you specify 100% width of something and it leaves a 15px empty space to the far right.
Please don't suggest that Gecko should implement buggy CSS like that.

you may consider that a majority of visitors to your site are "sure as hell" seeing that second scroll bar if they're using IE.


I can't help that people chose to use crappy browsers, but that doesn't mean that correctly working browsers should implement other browsers crappy solutions.
User avatar
djst
Moderator
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden
Contact:

Post by djst »

Stefan wrote:And I would give my right arm (well not really) to stop stupid IE to do that on eg this site I'm working on right now
http://hem.bredband.net/husste/krav/ny/base.html


I'm very temped to give you the url to <i>my</i> CS clan but since I know the code doesn't validate, I won't! ;)
User avatar
Nate
Posts: 55
Joined: November 5th, 2002, 1:46 pm
Location: Washington State, USA
Contact:

Post by Nate »

I accidentally stepped into a holy war. Apparently this was discussed to death in bug 72540.

Stefan, this may help you get rid of the extra scrollbars in IE, comment from the bug above: http://bugzilla.mozilla.org/show_bug.cgi?id=72540#c43

I officially withdraw this suggestion. Though I would like to see it implemented, it's too religious to be usefully discussed.
shimage
Posts: 129
Joined: November 5th, 2002, 3:39 am

Post by shimage »

Stefan wrote:
Nate wrote:Which makes webpges look very crappy indeed when you specify 100% width of something and it leaves a 15px empty space to the far right.


i guess i just don't understand what the big deal is with the ~15 pixels (<1.2% of the width of my screen? <1.5% on my other monitor). i haven't ever noticed a page that "bounced" around, but i really haven't been using phoenix that long. certainly, i don't give a rat's a$$ whether the scroll bar is displayed or not (i doubt i would notice it at all), but if things moved around everytime i clicked on a link that would get annoying.
User avatar
djst
Moderator
Posts: 2826
Joined: November 5th, 2002, 1:34 am
Location: Sweden
Contact:

Post by djst »

shimage wrote:i guess i just don't understand what the big deal is with the ~15 pixels (<1.2% of the width of my screen? <1.5% on my other monitor). i haven't ever noticed a page that "bounced" around, but i really haven't been using phoenix that long. certainly, i don't give a rat's a$$ whether the scroll bar is displayed or not (i doubt i would notice it at all), but if things moved around everytime i clicked on a link that would get annoying.


You can actually see the problem on <a href="http://texturizer.net/phoenix/">Phoenix Help</a>. Click between the Contact and FAQ page. However, I agree with Stefan that a scrollbar should not be displayed or provided space for if it wasn't needed. If I ever designed a page where I'd like complete control of all sides, the 15-16 pixel space gap on the right side would be very aestetic.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

shimage wrote:
Stefan wrote:
Nate wrote:Which makes webpges look very crappy indeed when you specify 100% width of something and it leaves a 15px empty space to the far right.


i guess i just don't understand what the big deal is with the ~15 pixels (<1.2% of the width of my screen? <1.5% on my other monitor).


It is a big deal. Let me explain a bit more.

Say you have a a white background on a page.
You then place eg a <div> with 100% width on the page with a black background as a heading.
If you don't have a scrollbar on the page some versions of Opera now will show a white about 15px wide line to the right of your black "box"... highly annoying...
This behaviour is even worse the IE's, since it reserves the space for the scrollbar without placing the scrollbar there...
shimage
Posts: 129
Joined: November 5th, 2002, 3:39 am

Post by shimage »

oh. ic... sorta. i've been using opera for about a year, and i never noticed that before. shows you how much i pay attention to the webpages i browse... it must be a lot more irritating to web designers, cause personally, i still couldn't care less if there was a white bar on the side or not (my opinion/taste. a very small minority), but thanks for pointing that out to me.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

Nate wrote:Stefan, this may help you get rid of the extra scrollbars in IE, comment from the bug above: http://bugzilla.mozilla.org/show_bug.cgi?id=72540#c43

I officially withdraw this suggestion. Though I would like to see it implemented, it's too religious to be usefully discussed.


Thanks for the tip, however that is invalid CSS. That alone IMO is a reason not to implement this. You can easily add a scrollbar with VALID CSS if you think it's important, but there is no valid way to remove the scrollbar if you DONT want it without using hacks.

Also, _removing_ the scrollbar with CSS is a very very bad idea, becuse that literraly makes the page unscrollable (as opposed to eg frames scroll=no which only removes the scrollbars, but leaves the page scrollable, eg with mouse or keyboard).

I just wonder how eg IE will handle the removing of a scrollbar together with the valid CSS Min-Width (when they decide to implement it...).

In short, the IE way opens a huge can of worms of how to make scrollbars appear when you want them but not show up when they are not needed. You will litterally have to write eg a javascript to handle the behaviour and still use INVALID CSS.

Thus not wanting scrollbars to show up is not religous, bug very logical as well as practical. Changing that behaviour to how IE does it currently is just stupid as it leads to all sorts of trouble.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

shimage wrote:shows you how much i pay attention to the webpages i browse... it must be a lot more irritating to web designers, cause personally, i still couldn't care less if there was a white bar on the side or not (my opinion/taste. a very small minority), but thanks for pointing that out to me.


The reason you don't see it is becuse that behaviour forces the webdevelopers to use other layouts or tedious workarounds to keep the page from looking broken.

It's one of those many "this programer that decided how it sould be have never coded a webpage in his life" situations that are sadly just too common. :(
User avatar
tepples
Posts: 17
Joined: November 6th, 2002, 3:22 pm
Contact:

Post by tepples »

Stefan wrote:You can easily add a scrollbar with VALID CSS if you think it's important


What's the valid CSS code for forcing the vertical scrollbar to appear without forcing the horizontal scrollbar to appear?
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

tepples wrote:
Stefan wrote:You can easily add a scrollbar with VALID CSS if you think it's important


What's the valid CSS code for forcing the vertical scrollbar to appear without forcing the horizontal scrollbar to appear?


Eg
<div style="position:absolute; top:0; height:100%; padding:0 0 1px">&nbsp;</div>
will do the job.

And it can easly be incorporated with the rest of your page, eg by having a positioned menu or logo image instead of the &nbsp;

Lots of other ways to do it to using valid CSS, this is just an example.
Locked