iframe oddity?

R

richard

Two iframes side by side.
One has a height of 500px and the other 800px.
Why is their a 300 px gap at the top of one?
Shouldn't the iframe base its starting point at the top?
If not, how to correct it?

www.mroldies.net
 
R

richard

Two iframes side by side.
One has a height of 500px and the other 800px.
Why is their a 300 px gap at the top of one?
Shouldn't the iframe base its starting point at the top?
If not, how to correct it?

www.mroldies.net

btw, when they are of the same height, there is no gap.
also, how do you properly style an iframe so the height and width adjust
according to content? overflow:hidden doesn't seem to work.
 
D

Denis McMahon

Put the iframes in divs and position the divs how you want them, or
position the iframes more accurately to start with.
btw, when they are of the same height, there is no gap.
also, how do you properly style an iframe so the height and width adjust
according to content? overflow:hidden doesn't seem to work.

If the parent and content are from the same site, they can talk to each
other, in which case you could try and send a request from the content to
the parent and the parent could try and dynamically resize the iframe.

If the parent and content are not from the same site, XSS security will
usually prevent that working, or indeed any communication between the
iframe content and the parent.
 

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,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top