Welcome to WebmasterWorld Guest from 35.175.191.168

Forum Moderators: not2easy

Message Too Old, No Replies

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

positioning of iframe

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

Preferred Member

10+ Year Member

joined:Jan 5, 2003
posts:380
votes: 0


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!

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

Junior Member

10+ Year Member

joined:June 9, 2005
posts:190
votes: 0


Have you tried to put it in a div and position the div?
1:30 am on Apr 10, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 5, 2003
posts:380
votes: 0


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>
1:52 am on Apr 10, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 5, 2003
posts:380
votes: 0


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.