iframe ie7 and height setting not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 
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
 
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 ([email protected], 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.
 
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
 
Back
Top