PDA

View Full Version : Iframes or something like them?



Cavemonster
18 Mar 2008, 10:05 PM
The client uses a service that allows them to manage their catalog and front page etc. through a gui.

Unfortunately, the page this service turns out is not so pretty.

My solution so far is to strip down their page to it's barest info and pop that into a larger shell with an iframe.

The problem with that is that the iframe height is static, so a height large enough for the longest pages leaves yards of space on others.

I've tried javascripts meant to resize iframes, but those I've found only work when pages are hosted on the same server, which these cannot be. I also can't add script to any of the referenced pages, I can only affect them with .css files.

Any ideas for a way to dynamically resize my iframes or another method that may work here?

Wickham
19 Mar 2008, 03:39 AM
You could try max-height for the iframe. It won't work in IE6 so IE6 will probably generate whatever height is needed if no other height is given.

IE7, Firefox, Opera and Safari should extend the height flexibly to the maximum and then create a scrollbar. I haven't tested this.

Edit: I found that max-height didn't work with an iframe.

If you set the iframe height to suit the page with least height it will create a scrollbar for the longer pages. Is that unacceptable?