Forum Moderators: open

Message Too Old, No Replies

iFrame Resize Bug in IE

Height/Width change on resize

         

kevlingo

4:36 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



Hello,

Boy, I am glad I found this forum!

I am working on a website: <Sorry, no personal URLs. See TOS [webmasterworld.com]>

The search engine you see is inside an iFrame. This looks and works exactly as I want, only when the IE window is resized, the iframe shrinks.

Oddly enough, this only happens when the width is resized, not the height. This also does not happen in FireFox.

Is there a way to keep this from happening?

Thanks a million!

Kevin Lingofelter

[edited by: tedster at 5:14 pm (utc) on July 25, 2004]

dtmuk

10:51 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



I think i understand, but on the other hand i could be completely wrong...

Is the width of your iframe a percentage
ie.<iframe src="search.html" width="10%"></iframe>

if it is then the iframes width is proportional to the browsers width...

to stop this you can simply specify the width in pixels ie. <iframe src="search.html" width="300"></iframe> for 300 pixels wide

David Middlehurst

kevlingo

11:04 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



Thanks for the reply!

Is there a way to make the width proportional? Just to satisfy my curiosity, is this a bug or a difference in the iFrame definition between browsers?

Kevin Lingofelter

dtmuk

11:10 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



An iframe is an inline frame.

Look here: [htmlhelp.com...]

Your problem is probably because your iframe doesnt have the scrolling attribute set. If this isn't set it then it is AUTO by default which means it suits the contents size. If you put scrolling=no then there will be not scrollbars whatever.

kevlingo

11:48 pm on Jul 25, 2004 (gmt 0)

10+ Year Member



Still no go. I have tried setting the scrolling attribute to all three options and, still, the height of the iframe gets small.

err..this is frustrating.

Does everyone else see this behavior with this page?

Thanks again for everyone's help!

Kevin Lingofelter

flashfan

2:58 am on Jul 26, 2004 (gmt 0)

10+ Year Member



You can overwrite iframe inline properties with CSS. Then you will be able to use % width or height.

kevlingo

3:58 pm on Jul 26, 2004 (gmt 0)

10+ Year Member



Thanks for the tip, but still no go.

Surely, I am not the only one having this issue am I?

This is so bizarre!

Kevin Lingofelter