SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,203
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Just adjust the iframe width a bit until IE is happy, E.g.

    Change
    Code:
    <iframe width="610"></iframe>
    to

    Code:
    <iframe width="630"></iframe>

  3. #3
    SitePoint Addict EarlyOut's Avatar
    Join Date
    Mar 2011
    Location
    Sector R
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    SitePoint Member
    Join Date
    Jun 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,203
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    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.

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    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?

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,826
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by twenty205 View Post
    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)
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  8. #8
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    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?

  9. #9
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •