Forum Moderators: not2easy

Message Too Old, No Replies

Easy in Firefox, Can't Work Out How in IE

positioning of iframe

         

eaden

11:19 pm on Apr 9, 2006 (gmt 0)

10+ Year Member



Hi,

I want to position an iframe element 80 pixels from the top of the window, and 10 from the other sides, and the iframe fills this entire area.

The code that works in firefox is :


iframe {
position: absolute;
top: 80px;
left: 10px;
right: 10px;
bottom: 10px;
}

But I cannot work out how to do this in IE at all, I've tried a few different ways but nothing seems to work. If you know of a solution please share!

coopersita

1:14 am on Apr 10, 2006 (gmt 0)

10+ Year Member



Have you tried to put it in a div and position the div?

eaden

1:30 am on Apr 10, 2006 (gmt 0)

10+ Year Member



yep, didn't seem to help

edit//
here is the full html source of my test page.


<html>
<head>
<style type="text/css">
body { margin: 0px; padding: 0px;}
iframe {
position: absolute;
top: 80px;
left: 10px;
right: 10px;
bottom: 10px;
}
</style>
</head>
<body>
<!-- just test with WebmasterWorld -->
<iframe src="http://www.webmasterworld.com/forum83/8856.htm"></iframe>
</body>
</html>

eaden

1:52 am on Apr 10, 2006 (gmt 0)

10+ Year Member



I have found a way using an IE hack using expressions. So that works for me :)

width: expression(document.body.offsetWidth - 40 + "px");

height: expression(document.body.offsetHeight - 100 + "px");

actually i'm having some problems with this but it's close.