name _F1
09-02-2006, 02:01 PM
I have an IFRAME nested in a DIV. I'm using Javascript to scroll the DIV, but I don't think that affects this problem.
The DIV's CSS is as follows:
.containerDiv {
width: 765px;
height: 503px;
overflow: hidden;
border: thin dotted #00357B;
}
<div id="container" name="container" class="containerDiv">
<iframe src="http://www.miniclip.com/games/tiger-golf/en/" width="640" height="1000" scrolling="no" frameborder="0" name="iframe" id="iframe"></iframe>
</div>
The overflow is hidden, as you can see. I use the DIV to effectively scroll the content of the IFRAME (as it is cross domain), but when I scroll it so that the bottom of the webpage in the IFRAME is below the bottom of the DIV, the webpage is outside of the DIV.
Actually, it is only Java applets that 'break out' of the DIV; it seems to work fine for normal webpages - I'm not sure why.
However, when I use overflow: auto; the DIV works properly, and the webpage is contained inside of the DIV.
I'm not sure what the problem is, and whether there is a solution. Any help would be greatly appreciated. :D
EDIT: Flash applets also break out of the DIV, after some testing on miniclip.com. I uploaded a picture to show you what I mean. IMAGE (http://img155.imageshack.us/img155/1457/breakoutqi9.png)
The DIV's CSS is as follows:
.containerDiv {
width: 765px;
height: 503px;
overflow: hidden;
border: thin dotted #00357B;
}
<div id="container" name="container" class="containerDiv">
<iframe src="http://www.miniclip.com/games/tiger-golf/en/" width="640" height="1000" scrolling="no" frameborder="0" name="iframe" id="iframe"></iframe>
</div>
The overflow is hidden, as you can see. I use the DIV to effectively scroll the content of the IFRAME (as it is cross domain), but when I scroll it so that the bottom of the webpage in the IFRAME is below the bottom of the DIV, the webpage is outside of the DIV.
Actually, it is only Java applets that 'break out' of the DIV; it seems to work fine for normal webpages - I'm not sure why.
However, when I use overflow: auto; the DIV works properly, and the webpage is contained inside of the DIV.
I'm not sure what the problem is, and whether there is a solution. Any help would be greatly appreciated. :D
EDIT: Flash applets also break out of the DIV, after some testing on miniclip.com. I uploaded a picture to show you what I mean. IMAGE (http://img155.imageshack.us/img155/1457/breakoutqi9.png)