variable height in iframe?
I have an iframe call that brings up different-sized pages depending on the subject. I've compromised by designating the iframe as being a specific height, like this:
marginheight="0" marginwidth="0">
However, the 1500 pixel height leaves considerable blank space at the bottom in the original display, while cutting off the display sometimes when the viewer goes for a look at an individual item.
Is there any way to make the height of the iframe depend on the content being returned?
druagord posted this at 15:05 — 27th January 2004.
He has: 335 posts
Joined: May 2003
you can probably do it the same way you change the src attribute. Another way would be to use javascript to adjust the size of the iframe but then you will need something that you can use as a reference to know what height you need. if the content is in a div you can use javascript to get the size of that div and set the iframe accordingly.
IF , ELSE , WHILE isn't that what life is all about
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.