On 2/5/2013 12:55 AM, Jukka K. Korpela wrote:
>> Should
>> I wrap the IFRAME in a DIV and set the size of the IFRAME to 100%?
>
> That seems to be the trick. And you would need to remove the default
> border, otherwise the page width will be a little over 100%. Example:
Apply the border to the div instead (see the modified demo version below).
> <style>
> div.iframecontainer {
> position:absolute; left:100px; right:0px; top:100px;
> }
> iframe {
> width: 100%; height: 100%; border: 0;
> }
> </style>
> <div class=iframecontainer><iframe src=test.html>
> <p>Cool, a browser without iframe support!</p>
> </iframe></div>
>
> Note the lack of any whitespace between the last end tags. If there's a
> line break between them, browsers may treat it as an empty line (?); you
> can see the effect if you set a background color on the div.
I found no problem with this in the latest Fx, Chrome, Opera, IE8 and
Maxthon.
Apple has stopped updating Safari for Windows and therefore Safari has
been removed from the European browser selection list and has been
replaced with Maxthon on the top 5.
My modified version:
<style>
div.iframecontainer {
position:absolute; top:50px; left:100px; right:0px;
border:1px solid; background-color: tan; height:200px;
}
iframe {
width: 100%; height: 100%; border: 0;
}
</style>
<div class="iframecontainer"><iframe src="
http://www.opera.com/">
<p>Cool, a browser without iframe support!</p>
</iframe>
</div>
--
Gus