I need my iframe to fit the content. The content may be several screens of content so I want the iframe to essentially act like a div so it doesn't scroll it just stretches to fit. Any ideas how to do this?
Use CSS to set the height of the iframe to 100%... also the container of the iframe must have a fixed size in order to work in IE.
That only sets it to 100% of the parent doesn't it? I want it to be the height of the page that opens within it so it doesn't scroll.
Well then you have to set the height of the iframe to the height of the page loaded in it... or use JavaScript to resize the iframe if you plan to load different pages.
It depends on what you want to use. If you decide to use jQuery, you can animate the resizing which will make it more attractive.
well no it dosn't need to be animated but I'm using jquery so it takes some of the leg work out of it. i just found this : http://www.lost-in-code.com/programming/jquery-auto-iframe-height/
actually it looks simpler than i thought .... something like ..... function setHeight(id) { e = document.getElementsById(id); if(e.contentDocument) { e.height = e.contentDocument.body.offsetHeight + 35; } else { e.height = e.contentWindow.document.body.scrollHeight; } }