470,841 Members | 1,063 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How to scroll only what is visible?

I have a HTML content with some pages
defined as <div>...</div>. One of them
is visible while the rest is hidden (the
visibility can be changed on client side).
The problem: standard window scroller
counts whole content (visible and hidden)
so empty space is also scrolled. I'd like
it to behave as only visible content
is to be scrolled (not empty space).
The same applies to print (window.print).
It prints not only what is visible, but
also empty pages for these div's which
are not visible.

How to set scroller (and print method)
to take only visible content of page?

Thank you in advance.

Marek Kotowski
Warsaw
Jul 20 '05 #1
1 1523
Marek Kotowski wrote:
The problem: standard window scroller
counts whole content (visible and hidden)
so empty space is also scrolled.
Don't use the "visibility" property but use
the "display" property and set it to "none".
How to set scroller (and print method)
to take only visible content of page?


Cure the disease, don't doctor the symptoms.
PointedEars
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Bill Sonia | last post: by
3 posts views Thread by Rithish Saralaya | last post: by
3 posts views Thread by Devonish | last post: by
3 posts views Thread by Peter Row | last post: by
4 posts views Thread by Marlene A. Roman | last post: by
2 posts views Thread by John | last post: by
7 posts views Thread by Sharon | last post: by
6 posts views Thread by =?Utf-8?B?U2hhcm9u?= | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.