Minimum Height of an Iframe

Discussion in 'HTML' started by David Morris, May 14, 2004.

  1. David Morris

    David Morris Guest

    Can someone please tell me why the following two frames are not the same
    size?

    <html>
    <head></head>
    <body>

    <iframe style="width:50px; height:50px;"
    src="http://www.subway.com"></iframe>

    <span style="width:50px; height:50px">
    <iframe height="100%" width="100%" src="http://www.subway.com"></iframe>
    </span>

    </body>
    </html>

    It looks like when you put an Iframe into a div, it can't be shorter
    than 150px. I only put it in the div so I can manipulate the iframes
    height and width via javascript.

    Thanx in advance.
     
    David Morris, May 14, 2004
    #1
    1. Advertising

  2. David Morris wrote:

    > Can someone please tell me why the following two frames are not the same
    > size?


    > <span style="width:50px; height:50px">
    > <iframe height="100%" width="100%" src="http://www.subway.com"></iframe>
    > </span>


    <span> is an inline element and thus:

    (a) Does not have height or width that can be influenced by CSS (at least
    without making it a block)
    (b) Can not, in HTML, hold a <div> element.

    http://validator.w3.org/ is your friend.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
     
    David Dorward, May 14, 2004
    #2
    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. Mark
    Replies:
    3
    Views:
    373
    Andy Dingley
    Nov 28, 2007
  2. Minimum height of web controls

    , Nov 25, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    110
    lotharlinux
    Dec 4, 2006
  3. Daedalous
    Replies:
    3
    Views:
    822
    Daedalous
    Jan 16, 2004
  4. Joe Attardi
    Replies:
    0
    Views:
    559
    Joe Attardi
    Jan 17, 2006
  5. chasquad
    Replies:
    0
    Views:
    110
    chasquad
    Feb 13, 2006
Loading...

Share This Page