0

I want the iframe to be the height of the src page so it fits the whole page without scrolling the iframe.

So far, the width works perfectly but not the height.

#iframe {
    overflow:hidden;
    width: 100%;
    max-width: 600px;
    height: 100%;
}
<iframe id="iframe" src="page.html" frameborder="0" scrolling="no"></iframe>
  • If the page within the iframe is coming from the same domain, then you will need to run some client-side script (see [this answer for a jquery solution](http://stackoverflow.com/a/3851588/930393)). If it's coming from a different domain, then you'll hit the [same origin policy](http://en.wikipedia.org/wiki/Same-origin_policy) which means you can't – freefaller Apr 10 '15 at 17:23
  • .. so you want to use frames. Please don't. You could always use cURL if you must show another page in a "frame." – Christian Apr 10 '15 at 17:47

0 Answers0