dynamic Iframe height (or Div) no scripting
Posted on 2005-03-14
Iframe's don't seem to be able to resize to the height of a document going into it.
On a big site, MANY pages of varying lengths may load into an Iframe, each of which must be findable by search engines, meaning "clean" links -- www.site.com/content/2014a.html
So a simple link seems necessary -- <A href="2014a.html" target="main">
<IFRAME name="main" width="400" height="[dynamic]"></IFRAME>
With dynamic = 100%, and with the enclosing html "height=100%" it doesn't work. When a pixel height is stated, the Iframe can't resize the fit the text, and scrollers are not an option.
Using DIVs instead, makes the property inheritance easy -- no special <BODY bgcolor=...> to set the Iframe color, and so forth. It's important for the many "loaded" pages to be as simple as possible.
Loading into a DIV, however, seems not to work without dynamic scripting, and of course, all this could be done with JS -- but then the links aren't found by S.E.s. Also the master site has much HTML layout already, and I don't think it could all be recast in CSS layout, without causing other issues.
You understand the problem, the need for clean links, but a global class inheritance for the Iframe or DIV, and the need to load without scripting. I need to get as many different workable ideas as possible toward a solution. Thanks.