No replies
velcro
Offline
newbie
Last seen: 17 years 20 weeks ago
Joined: 2005-02-19
Posts: 3
Points: 0

I'm going crazy with this one - if I use absolute positioning on a DIV and let the browser determine its size by using both top,left and bottom,right sets of properties (which Safari does correctly) and then place an IFRAME with 100% width and height inside that DIV - I'd expect that that IFRAME would be as high/wide as its parent right? Nope - in Safari height of that IFRAME is actually larger than the parent (and consequently enlarges the parent and messes-up my layout) - it seems that it took-up the height of the body.

Any ideas or fixes for this bug? Am I doing something wrong? (it works in mozilla and opera based browsers without problems)

Example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
	<head>
		<title>Test</title>
		<style>
			html, body {
				height: 100%;
				margin: 0;
				padding: 0;
			}

			#testing {
				position: absolute;
				top: 150px;
				bottom: 150px;
				left: 150px;
				right: 150px;
				background-color: red;
			}
		</style>
	</head>
	<body>
		<div id="testing"><iframe id="content_frame" frameborder="0" scrolling="yes" width="100%" height="100%" src="0delete.htm">&nbsp;</iframe></div>
	</body>

</html>