Flexbox.height = auto not working

I have a flexbox loading an htlm page in a iframe.
If i set the flexbox.height to auto the height is set to 150px even if in the iframe i set height=‘auto’

flexbox.innerHTML = " < iframe src='webpage.html' width='100%' height='auto' > < /iframe > "

How to have flexbox.height = the same height of the loaded webpage