469,648 Members | 1,379 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Make Scrollbar appear on a page

Is it possible to make the scrollbar appear on a page which is NOT A
POPUP?

On IE the scollbar space is always reserved or appears even if not
used. In Firefox it does not exist unless the page's window is larger
then the viewable area. This causes the page to jump left whenever you
go from a page without a scollbar to a page with a scollbar in
Firefox.

So i would like to have a piece of javascript that always enables the
scrollbar. Is this possible?

Thanks
Jan 15 '08 #1
5 1650
On 1/15/2008 9:46 AM, ry******@yahoo.com wrote:
Is it possible to make the scrollbar appear on a page which is NOT A
POPUP?

On IE the scollbar space is always reserved or appears even if not
used. In Firefox it does not exist unless the page's window is larger
then the viewable area. This causes the page to jump left whenever you
go from a page without a scollbar to a page with a scollbar in
Firefox.
It's a CSS thing.

If you use

body {
overflow:scroll;
height:100.01%;
}

Then you're CSS2-compliant, but you get both scrollbars in good ole Firefox.
If you use:

body {
overflow-y:scroll;
height:100.01%;
}

You are not in compliance, but it achieves your goal.

All the best,
~A!

--
anthony at my pet programmer dot com
CLJ FAQ:
<URL: http://www.jibbering.com/faq/ >
Jan 15 '08 #2
On 1/15/2008 9:46 AM, ry******@yahoo.com wrote:
Is it possible to make the scrollbar appear on a page which is NOT A
POPUP?

On IE the scollbar space is always reserved or appears even if not
used. In Firefox it does not exist unless the page's window is larger
then the viewable area. This causes the page to jump left whenever you
go from a page without a scollbar to a page with a scollbar in
Firefox.
It's a CSS thing.

If you use

body {
overflow:scroll;
height:100.01%;
}

Then you're CSS2-compliant, but you get both scrollbars in good ole Firefox.
If you use:

body {
overflow-y:scroll;
height:100.01%;
}

You are not in compliance, but it achieves your goal.

All the best,
~A!

--
anthony at my pet programmer dot com
CLJ FAQ:
<URL: http://www.jibbering.com/faq/ >
Jan 15 '08 #3
On Jan 15, 10:41*am, Anthony Levensalor <killf...@mypetprogrammer.com>
wrote:
On 1/15/2008 9:46 AM, ryanm...@yahoo.com wrote:
Is it possible to make the scrollbar appear on a page which is NOT A
POPUP?
On IE the scollbar space is always reserved or appears even if not
used. In Firefox it does not exist unless the page's window is larger
then the viewable area. This causes the page to jump left whenever you
go from a page without a scollbar to a page with a scollbar in
Firefox.

It's a CSS thing.

If you use

body {
* overflow:scroll;
* height:100.01%;

}

Then you're CSS2-compliant, but you get both scrollbars in good ole Firefox.

If you use:

* *body {
* * overflow-y:scroll;
* * height:100.01%;
* *}

You are not in compliance, but it achieves your goal.
It should be pointed out that the whole idea is insane. Also, this
proposed solution assumes quirks mode (the html selector would be used
otherwise.)
Jan 15 '08 #4
On 1/15/2008 11:08 AM, David Mark wrote:
>
It should be pointed out that the whole idea is insane. Also, this
proposed solution assumes quirks mode (the html selector would be used
otherwise.)
Thanks, David. I did not realize that was a quirks mode thing. Thanks! I
had tried it with the HTML selector, and it didn't work, probably
because I wasn't using valid markup at the time.

Much obliged for the correction.

And I agree, the idea itself is a hack to keep images from "jumping",
when it's fairly simple to do that with some decent styles and good markup.
~A!
--
anthony at my pet programmer dot com
CLJ FAQ:
<URL: http://www.jibbering.com/faq/ >
Jan 15 '08 #5
On 1/15/2008 11:08 AM, David Mark wrote:
>
It should be pointed out that the whole idea is insane. Also, this
proposed solution assumes quirks mode (the html selector would be used
otherwise.)
Thanks, David. I did not realize that was a quirks mode thing. Thanks! I
had tried it with the HTML selector, and it didn't work, probably
because I wasn't using valid markup at the time.

Much obliged for the correction.

And I agree, the idea itself is a hack to keep images from "jumping",
when it's fairly simple to do that with some decent styles and good markup.
~A!
--
anthony at my pet programmer dot com
CLJ FAQ:
<URL: http://www.jibbering.com/faq/ >
Jan 15 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Roderik | last post: by
3 posts views Thread by MuZZy | last post: by
1 post views Thread by Marco Liedekerken | last post: by
6 posts views Thread by Colin McGuire | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.