... and resizing IFRAMEs

  • Thread starter alejandro.rivero
  • Start date
A

alejandro.rivero

In Mozilla, thus,the following code seems to resize correctly the IFRAME,
so no scroll bars:

<iframe marginwidth=0 marginheight=0 src=text.html
onload="this.height=
this.contentDocument.height+25">
</iframe>

The +25 is just allowance for a newline. It can be done in
a more elegant way, for sure, and it is not really needed if
we explicitly ask noscroll.

Also, a frameborder=0 can be desiderable too

The moral is that the onload in the child document is not needed
anymore except for compatibility for old/alternate browsers. For an
instance, konqueror does not seem to admit onload in the iframe :-(

Yours,

Alejandro Rivero
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top