PDA

View Full Version : Automatic width and height in IE6/7


LargePig
08-15-2006, 02:17 PM
Anyone any ideas as to how to get this to work in IE6/7? (When i say work i mean, the top left of the iframe should be 50 from top and 50 from left and the bottom right should be 30 from right and 30 from bottom, this also needs to work with percentages)

Works in firefox.....

<html>
<body>
<iframe style="position:absolute;top:50px; left:50px; right:30px; bottom:30px" src="http://www.google.co.uk"></iframe>
</body>
</html>

Kravvitz
08-16-2006, 12:10 AM
IE5-6/Win wrongly ignores the right property when the left property is set and the bottom property when the top property is set.

You could use JavaScript to dynamically set the width and height of the iframe.