By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,660 Members | 1,945 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,660 IT Pros & Developers. It's quick & easy.

Make Scrollbar appear on a page

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.