473,396 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
4 10106
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
6
by: SF RVN | last post by:
I have searched NUMEROUS sources in an effort to find the magic (script, styles, syntax, etc.) that will allow me to create a web page with the following format: ...
5
by: Peroli | last post by:
Hi all, I have an iframe as stated below. When i initiate the function "open_frm()" everything is working as i expected. When the document is loaded, i click on a link in the iframe, with posts...
3
by: laredotornado | last post by:
Hi, I am trying to get my iframe to occupy the entire height of the table cell in which it is located. Sadly, this table cell may have variable height. This is the code I'm using right now that...
3
by: PCgeek | last post by:
sorry moved this over to javascript forum, didn't mean to post 2x! Hi guys, I'm trying to put the finishing touches on my website and could really use some help on this particular issue. My page...
1
by: totalstranger | last post by:
Has anyone found a reasonable, simple way to determine the height of variable length embedded data in a cross-domain IFRAME? I'm not interested in reading or viewing the data in the IFRAME, I...
9
by: DL | last post by:
That is, for an iframe with onload attribute to preset a width and height then depending on the length of its content to auto-expand instead of scrolling. The following URL is quite interesting,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.