How do you give iframe 100% height

code511788465541441 picture code511788465541441 · Mar 11, 2011 · Viewed 290.5k times · Source

I'm trying

<iframe height="100%" ...>

but it still doesn't resize it. When i try the height in pixles it works.

edit: 100% seems to be working on IE but not firefox

Answer

dtech picture dtech · Mar 11, 2011

You can do it with CSS:

<iframe style="position: absolute; height: 100%; border: none"></iframe>

Be aware that this will by default place it in the upper-left corner of the page, but I guess that is what you want to achieve. You can position with the left,right, top and bottom CSS properties.