Tabrez Ahmed
Tabrez Ahmed

Reputation: 2950

Setting <iframe>'s height to maximum document's height

I have the following code:

<iframe src="http://www.externalsite.com/" style=""/>

Assume the total height of www.externalsite.com to be X pixels. X is unknown to me. How do I set height of the iframe to X pixels using CSS or other methods but no JavaScript?

Upvotes: 0

Views: 188

Answers (2)

akshay1728
akshay1728

Reputation: 383

try the following code

<body style="margin:0px;padding:0px;overflow:hidden">
<iframe src="http://www.youraddress.com" frameborder="0"   style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe>
</body>

Upvotes: 1

Hadi
Hadi

Reputation: 181

<iframe src="http://www.externalsite.com/" width="200" height="X"></iframe>

see here for more details: http://www.w3schools.com/html/html_iframe.asp

Upvotes: 0

Related Questions