ryankent — 2011-06-10T18:05:46-04:00 — #1
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.
ralphm — 2011-06-10T23:52:20-04:00 — #2
Just adjust the iframe width a bit until IE is happy, E.g.
<iframe width="<font color='"Blue"'>610</font>"></iframe>
<iframe width="<font color='"red"'>630</font>"></iframe>
earlyout — 2011-06-11T06:01:25-04:00 — #3
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.
ryankent — 2011-06-11T15:09:06-04:00 — #4
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.
ralphm — 2011-06-11T20:44:44-04:00 — #5
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.
twenty205 — 2011-06-11T21:14:14-04:00 — #6
I use iframes a reasonable amount so this is a worry, are you sure it's been deprecated?
felgall — 2011-06-11T22:04:15-04:00 — #7
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)
twenty205 — 2011-06-11T22:15:54-04:00 — #8
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?
xhtmlcoder — 2011-06-12T12:22:12-04:00 — #9
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.