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. Advertising

  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. Advertising

  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. Advertising

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:
    3
    Views:
    521
  2. Edwin Knoppert
    Replies:
    0
    Views:
    370
    Edwin Knoppert
    Dec 29, 2005
  3. nooobody

    bean reflection oddity

    nooobody, Feb 20, 2005, in forum: Java
    Replies:
    4
    Views:
    626
    nooobody
    Feb 20, 2005
  4. Remon van Vliet

    Oddity in ByteBuffer code?

    Remon van Vliet, May 19, 2005, in forum: Java
    Replies:
    5
    Views:
    442
    Chris Uppal
    May 20, 2005
  5. Daedalous
    Replies:
    3
    Views:
    714
    Daedalous
    Jan 16, 2004
Loading...

Share This Page