Forum Moderators: open

Message Too Old, No Replies

How do i set a no scroll on a page...?

the questions are pouring in tonight..sorry...

         

Harley_m

10:37 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



different site, different question, i simply need to stop a window from scrolling...

how is it done...?

Thanks so so much guys...you make my life worth living!

harley

moonbiter

11:02 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



Theoretically,

html {
width: 100%;
height: 100%;
clip: auto;
position: absolute;
overflow: hidden;
}

Should work. In practice, you can click and drag the text on the page to scroll in MSIE, although scrollbars do not appear. Works correctly in Mozilla and Opera, though.

[edited by: moonbiter at 11:02 pm (utc) on Sep. 18, 2002]

andreasfriedrich

11:02 pm on Sep 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<body scroll="no"> if you donīt mind that itīs not legal html4.01

moonbiter

11:05 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



Cool. Combine the two techniques and you have all the modern browsers covered.

Harley_m

11:07 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



thats great thinking guys...the beauty of a forum is answers can evolve and come up with even better ones...

works a treat, thanks guys... :)

moonbiter

11:18 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



In case you want to know the thinking behind the CSS approach:

width: 100% [w3.org], height: 100% [w3.org], and position: absolute [w3.org] sets the size of the html element to the size of the viewport.
clip: auto; [w3.org] defines the entire size of the box as the clipping area.
overflow: hidden [w3.org] hides any content that overflows the clipping area.

dhdweb

11:57 pm on Sep 18, 2002 (gmt 0)

10+ Year Member



Even with both, it still scrolls in IE by draging.