From: Steve Pugh on
I have a web page which contains an <iframe> similar to:

<iframe src="intro.html" width="100%" height="100%" name="content">
...
</iframe>

The referred CSS defines as width and height:

IFRAME { position: absolute; left: 150px; top: 30px }

Unfortunately these parameters makes the iframe as wide and height as the browser window.
But the offset is 210px from the left window border. So the iframe is shifted to the right
creates a horizontal scrollbar.

Furthermore the height is calculated as 100% of the current browser window and not the height of
the loaded sub page "intro.html".

What I need is something like the following "calculated" width and height:


<iframe src="intro.html" width="calc(currentbrowserwindowwidth - 210px)"
height="100% of current_src_html()" name="content">
...
</iframe>

Of cause intro.html could be replaced by other web pages. So the height should not depend on
intro.html in detail but on whatever is currently loaded.

How can I code this with html/CSS ?

Steve