How to scroll only what is visible?

M

Marek Kotowski

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
 
T

Thomas 'PointedEars' Lahn

Marek said:
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
 

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

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top