Click to See Complete Forum and Search --> : iFrame not expand to 100% height


cohq82
08-12-2009, 01:31 AM
I have this below html. And I would like the iFrame to cover the rest of the screen with 100% on whatever left. I tried "100%" and "*" in height attribute but not working. Why is that? Thanks

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div id="container-frame">
<img id="if-logo" height="35" width="84" alt="Kucku" src="/Content/Images/logo.gif"/>
<img id="if-avatar" height="30" width="30" alt="Avatar" src="http://web.kucku.vn/Content/Images/Avatars/default_profile_bigger.png"/>
<a id="if-username" href="/nvthoai">aaa</a>
<div id="if-box">
</div>
<a id="if-close" href="http://www.yahoo.com" target="_top"> </a>
<div id="if-link">
</div>
<div id="if-star">
</div>
</div>
<iframe id="mainFrame" frameborder="no" width="100%" title="mainFrame" framespacing="0" border="0" name="mainFrame" src="http://www.yahoo.com" style="display: block; width: 100%; float: left; height: 100%;">
<html xmlns="http://www.w3.org/1999/xhtml">
</html>
</iframe>
</body>
</html>



#container-frame {
background:#E1E1E1 url(../images/if_bg.gif) repeat-x scroll 0 0;
height:35px;
width:100%;
}

tarascan
08-13-2009, 04:51 AM
I believe what you need to do is put your CSS code in a embedded style css type.Note that I put the CSS code in the head tags wrapped around style type tags.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#container-frame {
background:#E1E1E1 url(../images/if_bg.gif) repeat-x scroll 0 0;
height:35px;
width:100%;
}
</style>
</head>

Siddan
08-13-2009, 05:14 AM
you cannot style an iframe to have 100% height...
But I found another thread who found help with javascript coding

http://www.dynamicdrive.com/forums/showthread.php?t=19900

Or search for other topics on google regarding iframe 100% height. It is a quite problem by many