467,864 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,864 developers. It's quick & easy.

iframe ie7 and height setting not working

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 '07 #1
  • viewed: 9895
Share:
4 Replies
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
Oct 29 '07 #2
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/..._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 <jerr...@nospam.nospamwrote:
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 '07 #3
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_..._position.html

Regards,
Walter Wang (wa****@online.microsoft.com, 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.

Oct 30 '07 #4
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_..._position.html

Regards,
Walter Wang (wa****@online.microsoft.com, 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.

Oct 30 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by SF RVN | last post: by
5 posts views Thread by Peroli | last post: by
3 posts views Thread by laredotornado | last post: by
3 posts views Thread by PCgeek | last post: by
1 post views Thread by totalstranger | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.