Simple answer...you cant
(sorry)
The reason is due to the cross domain policy (more, info) you cant access the iframe
child document and therefore ascertain its height
in order to resize the iframe
accordingly, simply put
In computing, the same-origin policy is an important concept in the
web application security model. The policy permits scripts running on
pages originating from the same site – a combination of scheme,
hostname, and port number – to access each other's DOM with no
specific restrictions, but prevents access to DOM on different
sites.
source
[...]
If you don't have control over the framed site, you cannot circumvent
the cross-domain policy.
source
And if you cant do this, you cant do what you want because there is no way of ascertaining the child document's height.
It seems the reason you want to do this is design related. As such, you may want to look at different ways to implement the content (iframe) within your site, the obvious one being that the natural restriction on height is browser viewport height, perhaps therefore make the iframe
100% of the viewport (html, body) height? Although this will interfere with your design if there are other components on the page...but there are alternatives...the iframe
could:
Be aligned to one side of the page with 100% height set
Be placed within a popup or modal window with 100% height/width
Be controlled (JS) to stretch with the parent window, perhaps with a fixed bottom
Also remember that because this is a global restriction on this kind of content, users are not completely unused to seeing it so though it isnt an ideal design choice, it isnt necessarily one which will confuse/suprise visitors to your site.