Search code examples
cssiframeinternet-explorer-7internet-explorer-6position

Iframe content not visible in IE6 and IE7


I am facing a problem with iframes in IE6 and IE7. I am trying to load iframe (containing static HTML) from same domain, no 3rd party plugins. But iframe content is not visible in both browsers.

I have used z-index as well but it is also not working. When applied a border to iframe to see if it is there, I found that iframe is there but content is not there.


Solution

  • I see a few extraneous semicolons in the code that you posted. For example:

    <html xmlns="w3.org/1999/xhtml"; lang="en" xml:lang="en">
    

    There should not be a semicolon after the attribute value for xmlns.

    Nor should there be one at the end of this line:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
    

    Also, as @Erno said, explicitly close IFRAME tags. These changes combined may fix the problem.

    If it still doesn't work, try getting a very basic page inside the IFRAME to work, and troubleshoot from there as you add more elements back into the page. As soon as it stops working, you've identified a problem.