Log in

View Full Version : Iframe problem in FF & IE



techunar
07-15-2006, 11:07 PM
Hello Everyone,

I have created a page containing my MENU (dhtml/css based), I have attached this menu page using the IFRAME.

Heres the code:
<div id="menu" style="height: 40px;">

<iframe marginwidth="0" marginheight="0" src="menu.html" frameborder="0" width="100%" scrolling="no"></iframe>

</div>

The problem is, Firefox displays everything fine, like It does'nt shows space in between menu & rest of the page, but the Internet Explorer includes the space ( upto the length of my drop down menu ).

Here are snapshots:

http://www.freewebs.com/wusoft/menu_ff.jpg - Firefox
http://www.freewebs.com/wusoft/menu_ie.jpg - IE

Kindly Help me out.

jscheuer1
07-16-2006, 03:56 AM
It is very hard to say without seeing the live page, so that all markup and styles can be considered together as to their net effect on the presentation in the various browsers. Without that I can only suggest one thing that often works. That is to use absolute positioning:


<div id="menu" style="height:40px;position:absolute;">

<iframe marginwidth="0" marginheight="0" src="menu.html" frameborder="0" width="100%" scrolling="no"></iframe>

</div>

But, this can throw it off in the other direction, causing overlaps so, then a container with relative positioning:


<div style="height:40px;position:relative;">
<div id="menu" style="height:40px;position:absolute;">

<iframe marginwidth="0" marginheight="0" src="menu.html" frameborder="0" width="100%" scrolling="no"></iframe>

</div></div>

techunar
07-16-2006, 12:51 PM
Thanks John, that helped me & my problem is resolved.