iFrame height

iFrames, do they even still exist?

Well integration with systems isn't aways APIs, XML and JSON magically working in harmony.  Some times you have to integrate a web app into another site as quickly as possible, maintaining the sparation to avoid unpleasant upgrade costs.

iFrames intially appear to be a great solution, but they do present a number of horrible problems.  The worst offender IMO is the height property.  Why on earth does setting the height to auto or 100% not allow the iFrame to fit the content it contains automatically?  This would seem the most logical and common option, who likes scroll bars inside scroll bars?  Well I guess those higher powers that design specifications seemed to decide that scrollbars are great.

So far the best solution I have found so far is at Dynamic drive, a bit of JavaScript that automatically resizes the iFrame to fit the content.  However, a word of warning I found I had to make some minor pixel adjustments in the code, but otherwise it appears to work.

If anyone knows a pure HTML, CSS method I would love to hear it.


Popular posts from this blog

IE9 Intranet compatibility mode in Intranet websites

Intersystems Caché performance, woe is me...

Multi-select with shift on HTML table