View Full Version : IFRAMES and sizing?

08-10-2005, 08:02 PM
If I have an iframe in a page that serves ads..
sometimes there might be 5 ads, other times 2 ads etc..
Is there a way to have the iframe expand to accomodate any amount
of ads without losing space...

so if there there 2 ads....I don't want the iframe shownig the same size
as 5 ads....a waste of space, and it would look funny on a page.


08-10-2005, 09:06 PM
If the location of your iframe is from your server you can. But since I do not know of any ad servers that allow this then it is not possible.

08-11-2005, 12:48 AM
well yes, the ad server willl serving up its own page within the iframe....so, its not in the same domain...

so, what are my options...

lets say...
if there are 5 ads..the size of the page is 300 X 500
if there are 3 ads..the size of the page is 300 X 250

I want the iframe to vary its height depending no the content that is generated..

If I don't set a 'height' in the iframe, wont it just automatically size it self appropriately?

08-11-2005, 01:31 AM
No iframes default to their normal size...

08-11-2005, 05:51 AM
You could use javascript if your ads were being generated on your own server but since they aren't, you'll get an access denied error.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum