Make Scrollbar appear on a page

R

ryanmhuc

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
 
A

Anthony Levensalor

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!
 
A

Anthony Levensalor

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!
 
D

David Mark

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.)
 
A

Anthony Levensalor

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!
 
A

Anthony Levensalor

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!
 
R

ryanmhuc

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!

Thanks for the suggestion but you say its easy to stop the shifting/
jumping with good styles and markkup.

How would you stop the page from shifting if the page is centered and
some pages don't have a scroll bar and others do?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top