I know using iFrame is strongly discouraged but I need to make the application that runs on IE8 and older and they already have large old codes using iFrames. I was stuck in a problem about the iFrames. Here is my two iframes:
<div>
<div width="20%" height="100%">
<iframe width="20%" name="treestruct" src="menu.html" height="800px"/>
</div>
<div width="70%" height="100%">
<iframe width="80%" name="mainbody" src="content.html" height="800px"/>
</div>
</div>
Recently, I have been asked to make it work for Firefox too. But when I tried to see it on FF, the only first iFrame is shown. It works fine in IE but not in FF or any other modern browsers. I really got stuck what’s going on here. What will be the solution for this? I know this might be a minor problem and I am also a great supporter of HTML5 and want to avoid these types of deprecated tags, but I have large code written in old html and have to make them work on IE8 and older. I do not have options. Any suggestions?
According to w3school, you have to close your iframe tag with
</iframe>. So change your code to something like this:and give it a try. It should work just fine…