iframe ie7 and height setting not working

Discussion in 'ASP .Net' started by =?Utf-8?B?SmVycnkgQw==?=, Oct 29, 2007.

  1. I am using a I frame in a page and trying to set the height to height=100%
    and it is not working. If I use height=600px it works. I find some stuff
    about the DOCTYPE on the internet but changing the doctype does not work.
    Maybe I am using the incorrect doctype.

    This line works:
    <iframe id="fraAdmin" width=100% height:600px;" visible="true"
    runat="server" ></iframe>


    This line does not work:
    <iframe id="fraAdmin" width="100%" height="100%" visible="true"
    runat="server" ></iframe>

    Thank you
    --
    Jerry
    =?Utf-8?B?SmVycnkgQw==?=, Oct 29, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?SmVycnkgQw==?=

    bruce barker Guest

    in html 4.0 & css 2.0 height=100% requires that the parent have an
    absolute size or its ignored. as the body does not have a height, size
    of its content. even ie 6.0 will not work if you take it out of tweaks
    mode (doc type controls this).


    this is different then the frameset, whose width and height are based of
    the viewport.


    -- bruce (sqlwork.com)



    Jerry C wrote:
    > I am using a I frame in a page and trying to set the height to height=100%
    > and it is not working. If I use height=600px it works. I find some stuff
    > about the DOCTYPE on the internet but changing the doctype does not work.
    > Maybe I am using the incorrect doctype.
    >
    > This line works:
    > <iframe id="fraAdmin" width=100% height:600px;" visible="true"
    > runat="server" ></iframe>
    >
    >
    > This line does not work:
    > <iframe id="fraAdmin" width="100%" height="100%" visible="true"
    > runat="server" ></iframe>
    >
    > Thank you
    bruce barker, Oct 29, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?SmVycnkgQw==?=

    Guest

    Hi Jerry,

    I just dealt with this problem this morning. Unfortunately, I wasn't
    able to find an HTML attribute or CSS style to get the iframe
    height="100%" working. I did however find this JavaScript that I
    incorporated: http://brondsema.net/blog/index.php/2007/06/06/100_height_iframe.
    I also found though that if I removed the DOCTYPE node and the "xmlns"
    attribute from the html tag, that height="100%" does work.

    Andy

    On Oct 29, 1:31 pm, Jerry C <> wrote:
    > I am using a I frame in a page and trying to set the height to height=100%
    > and it is not working. If I use height=600px it works. I find some stuff
    > about the DOCTYPE on the internet but changing the doctype does not work.
    > Maybe I am using the incorrect doctype.
    >
    > This line works:
    > <iframe id="fraAdmin" width=100% height:600px;" visible="true"
    > runat="server" ></iframe>
    >
    > This line does not work:
    > <iframe id="fraAdmin" width="100%" height="100%" visible="true"
    > runat="server" ></iframe>
    >
    > Thank you
    > --
    > Jerry
    , Oct 29, 2007
    #3
  4. Hi Jerry,

    Besides what Andy has suggested, I just want to add that following page
    might be also useful for you:

    #Getting window size and scroll bars position in JavaScript/DHTML
    http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html



    Regards,
    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Oct 30, 2007
    #4
  5. Thank you for the replys.

    I do not do much Scripting so I just used the Height=500px instead of trying
    to fix the problem. Whatever is going on in the browsers the 100% works in
    all browsers except IE7. I will come back to this problem when I have time.

    Thank you

    --
    Jerry


    ""Walter Wang [MSFT]"" wrote:

    > Hi Jerry,
    >
    > Besides what Andy has suggested, I just want to add that following page
    > might be also useful for you:
    >
    > #Getting window size and scroll bars position in JavaScript/DHTML
    > http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html
    >
    >
    >
    > Regards,
    > Walter Wang (, remove 'online.')
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    =?Utf-8?B?SmVycnkgQw==?=, Oct 30, 2007
    #5
    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. MyndPhlyp

    Setting <img> height to match <td> height

    MyndPhlyp, Dec 21, 2003, in forum: Javascript
    Replies:
    5
    Views:
    183
    MyndPhlyp
    Dec 22, 2003
  2. Daedalous
    Replies:
    3
    Views:
    663
    Daedalous
    Jan 16, 2004
  3. Joe Attardi
    Replies:
    0
    Views:
    493
    Joe Attardi
    Jan 17, 2006
  4. Replies:
    0
    Views:
    156
  5. DL
    Replies:
    10
    Views:
    173
Loading...

Share This Page