IE9 Iframe issue

Hello.

I have an iframe which appears perfectly in FF3.6, FF4, Chrome and IE8. In IE9 the right side is cut off.

I would prefer not to over-extend the width if I can find the root issue instead.

Rent Makati Condos - Manila, Philippines business and vacation condo rentals

Assuming this issue is resolved, the right area will be used for a sidebar.

Any input would be appreciated.

Just adjust the iframe width a bit until IE is happy, E.g.

Change

<iframe width="[COLOR="Blue"]610[/COLOR]"></iframe>

to

<iframe width="[COLOR="red"]630[/COLOR]"></iframe>

Enlarging the iframe will “solve” the problem, but there’s something more fundamental going on here. If you push the page into IE8 emulation mode, the iframe content appears the way it does in FF (in IE9, it has a noticeably different appearance), and the size is no longer an issue. How IE9 handles iframes is confusing, to say the least.

Ralph, thank you for the answer. Your solution works.

I would love to improve my understanding on why this adjustment is necessary for IE9, but I will have to let it go for now.

Given that iframe is a deprecated element, maybe MS didn’t put too much thought into how it renders. Very odd that it would behave differently from other versions of IE, though. It’s all part of the wondrous mystery that is IE.

I use iframes a reasonable amount so this is a worry, are you sure it’s been deprecated?

iframes weren’t deprecated because they are a proprietary tag that never was adopted into the standard in the first place. HTML4 only accepts iframe in its transitional doctype because there were so many web pages using it that need to transition it to the object tag that they didn’t want to be reporting it as an error.

To be deprecated implies that the tag was valid in the HTML 3.2 standard and iframe was never been part of that standard. Those developing the HTML 4 standard decided to specify the object tag as the way to perform that function instead. The only reason why object hasn’t completely replaced the need for iframe is that there are still one or two antiquated browsers that don’t handle the object tag properly when used for displaying HTML (although it almost works properly in IE6 and 7)

OK this makes more sense. I’ve had a look at the specs and I see that it’s not allowed in STRICT.

I’ve never used the object tag in place of an iframe, I’ll try it out.

So what do you make of it being included in the HTML5 draft, couldn’t that be interpreted as an intent to adopt the iframe for good, rather than remove it?

A lot of strange things have happened with HTML5 and its idea of (re)introduction of elements. Mainly purely based on many sites using them whether or not those sites were using good or bad practice in the first place? Then again they have also changed the context of several others too.