Setting height = 100% for iframes

Discussion in 'Javascript' started by laredotornado, Jan 27, 2009.

  1. Hi,

    I'm wondering if there's a Javascript solution to this. I'm trying to
    get my iframe to occupy 100% of its parent block element. But the
    height=100% attribute in CSS isn't doing the trick. Here's my
    HTML ....


    <td width="177" height="100%" valign="top" class="content-
    rule"><iframe id="fileTreeIframe" style="border:0px none #ffffff;"
    src="file_tree.php" border="0" width="100%" scroll="auto"></iframe></
    td>


    and the CSS ...


    iframe { display:block; height:100%; width:100%; border:none; }


    It doesn't look good right now -- http://screencast.com/t/mIzGnUikC.
    Is there a Javascript way to make my iframe occupy 100% of its parent
    element?
     
    laredotornado, Jan 27, 2009
    #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. Not4u
    Replies:
    9
    Views:
    1,045
    Not4u
    Feb 27, 2004
  2. Replies:
    8
    Views:
    6,695
    Neredbojias
    Dec 9, 2005
  3. Bernd Meier
    Replies:
    6
    Views:
    518
    GTalbot
    Jan 14, 2008
  4. fred
    Replies:
    3
    Views:
    284
    Zifud
    Mar 17, 2005
  5. Replies:
    5
    Views:
    891
Loading...

Share This Page