Div inside an iframe - how to set height relative to the iframe's visible size?

J

Joe Attardi

Sorry for the confusing subject line; I'm not sure how best to phrase
the problem I'm having.
I have an iframe that contains two divs, each containing a table. Each
of these divs has its height set to 50%, and those two divs make up the
entirety of the page contained within the iframe.

<body>
<div id="..." style="height: 50%;">...</div>
<div id="..." style="height: 50%;">...</div>
</body>

The problem is that the divs' heights are relative to the size of the
entire document, and not the visible size of the iframe. What I need to
do is have the two iframes have a height of 50% relative to the
_visible area_ of the iframe.

If you need further explanation let me know. Any ideas how to do this?
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top