iframe oddity?

Discussion in 'HTML' started by richard, Jun 4, 2013.

  1. richard

    richard Guest

    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
     
    richard, Jun 4, 2013
    #1
    1. Advertisements

  2. richard

    richard Guest

    On Tue, 4 Jun 2013 16:50:01 -0400, richard wrote:

    > 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.
     
    richard, Jun 4, 2013
    #2
    1. Advertisements

  3. On Tue, 04 Jun 2013 17:19:52 -0400, richard wrote:

    > On Tue, 4 Jun 2013 16:50:01 -0400, richard wrote:
    >
    >> 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?


    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.

    --
    Denis McMahon,
     
    Denis McMahon, Jun 4, 2013
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    892
  2. mi
    Replies:
    4
    Views:
    18,146
    dorayme
    May 21, 2008
  3. elca
    Replies:
    0
    Views:
    760
  4. Scott
    Replies:
    6
    Views:
    1,389
    [MSFT]
    Apr 14, 2004
  5. Replies:
    0
    Views:
    681
  6. Gustavo
    Replies:
    0
    Views:
    201
    Gustavo
    Aug 25, 2003
  7. Daedalous
    Replies:
    3
    Views:
    1,154
    Daedalous
    Jan 16, 2004
  8. James Wallace
    Replies:
    1
    Views:
    221
    William Morris
    May 14, 2004
Loading...