By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,909 Members | 2,008 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,909 IT Pros & Developers. It's quick & easy.

iframe ie7 and height setting not working

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.