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.

Comments

Popular posts from this blog

IE9 Intranet compatibility mode in Intranet websites

User Interface Usability Checklist Part 2

Procedural VS Object Oriented