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

Discussion in 'Javascript' started by Joe Attardi, Jan 17, 2006.

  1. Joe Attardi

    Joe Attardi Guest

    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?
    Joe Attardi, Jan 17, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. muggslab

    Div Height = Image height. help

    muggslab, Feb 1, 2010, in forum: HTML and CSS
    Replies:
    1
    Views:
    855
    muggslab
    Feb 1, 2010
  2. Don Vaillancourt

    How to tell height of div where height is not set?

    Don Vaillancourt, Jan 28, 2005, in forum: Javascript
    Replies:
    8
    Views:
    134
    Dietmar Meier
    Jan 31, 2005
  3. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    178
    David Dorward
    Jun 1, 2005
  4. Replies:
    0
    Views:
    114
  5. 123Jim
    Replies:
    0
    Views:
    134
    123Jim
    May 16, 2011
Loading...

Share This Page