iframe self adjusting height.

I have been doing some research on self adjusting height on some of my site projects. One of the most challenging one for me is that some of my pages using ifrmae to reference from another page. The problem is, it’s not always diplsy correctly the height and width. it’s been exahusting since i am not majoring in CS and coding is a been hard for me. But i finally get this work well.

I have tried jscripts, it never really works. The problem i suspect is because not all browser using the same language translater. IE or most will redefined the iframe value to 0 and reload it, in another words some others will do it accorindly by the abolute values.

Here is a very simeple codes:

<iframe id=’iframe2′ src=”./index_frame.htm” frameborder=”0″ style=”overflow: hidden; height: 100%; width: 100%; position: absolute;” height=”100%” width=”100%”></iframe>


By doing so, it will self adjust the iframe size according to the documents and based on the current page size. Works perfrecly for me.