Vertical viewport without scrollbars?

S

Stefan Brückner

Hello NG,

I'm looking for an solution to find out the real vertical viewport -
without the height of horizontal scrollbars.

I have two frames side by side. The left one declared 'scrolling="no"'
and the right one 'scrolling="auto"'. For the left frame it is important
to know if the right frame has a horizontal scrollbar and how sick it
is. So I have tried to compare the viewport of both frames.

Using 'window.innerHeight', 'document.documentElement.clientHeight',
'document.body.clientHeight' or 'document.body.offsetWidth' I get the
height including the scrollbars.

The same problem with two frames (rows="50%,50%) i've solved with block
elements declared with a width of 100%. Comparing the offsetWidth of
both, I can see if there is a scrollbar in one frame. But with frames
side by side that doesn't work.

Are there any ideas?

TIA,
Stefan
 
S

Stefan Brückner

Ed said:
I solved the same issue by including a nested div in the scrolling div that
limits the width of text.

<div style = "width: 750px; overflow: auto;">
<div style = "width: 740px;">
blah blah blah
</div>
</div>

Thx @ Ed, but I can't see the relation to my problem - sorry.

Stefan
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top