fix Iframe height in Percentage to aquire contents full height

182 Views Asked by At

I have implemented iframe like this

<iframe name="Container" width="100%" height="900px" frameborder="0"></iframe>

Here i am fixing the height using pixels which will create problem when i change screen resolution. Since content which will be displayed in iframe vary every time(target used for different html's to display in iframe )Hence i want to fix frames height in Percentage.So that it could display whole content without scroll bar. Thank you

1

There are 1 best solutions below

0
On BEST ANSWER
<iframe name="Container" width="100%" height="100%" frameborder="0"></iframe>

Try this code. You can set height equal to 100%. In order to solve the problem