iframe ie7 and height setting not working

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
 
B

bruce barker

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)
 
A

andrew.douglas11

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
 
W

Walter Wang [MSFT]

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.
 
G

Guest

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
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top