I am want to be able to set the height of my iframe to automatically stretch to fit the content it is loading.

I however want to ensure this does not go over a certain height eg: 690px.


Does anyone have an idea of how to go about this ?

I would sugguest going Jquery. Use ajax to pull content into a DIV with a max height of 690px. Since the div will automatically size depending on the content as well as just be a whole lot neater

Try this :) I use it and works

<iframe src="http://www.sample.net/index.html" width="690" height="690" scrolling="no" frameborder="0" ></iframe>

In this way the iframe window will be always 690x690

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.