SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Inline Frames (iframes)

    I have been coding up a design for a friend, and he wanted an iframe in the center of it. The place where the iframe should have been was filled with a spacer image, so I put in an iframe with the same dimensions in the same place, but it pushes all the images out of alignment, and messes up the whole design. Does anyone know why?
    Last edited by AndyXL; Sep 10, 2002 at 12:59.
    Andy: Always Morphin Dwarfs

  2. #2
    (****** or Deleted)
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybr the iframe automatically adds margins or padding? Try adding <iframe style="margin:0px; padding:0px;" src=""> and see howe it goes?

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2002
    Location
    Bristol, UK
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I found the answer. I was coding in xhtml, so I used the code
    <iframe width="422" height="277" src="<?phpbit?>" />
    when I changed it to
    <iframe width="422" height="277" src="<?phpbit?>"> </iframe>
    it worked
    Andy: Always Morphin Dwarfs

  4. #4
    SitePoint Enthusiast Utopia's Avatar
    Join Date
    Sep 2002
    Location
    United Kingdom
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    iframes have the closing </iframe> convention by default in html. the text between is displayed if the browser cant render an iframe, e.g. <iframe src="this.html">Go figure</iframe>

  5. #5
    SitePoint Enthusiast plattopus's Avatar
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also note that iFrame support wasn't achieved until version 6 of Netscape, and I'm not sure about Opera/Mozilla, but I highly doubt they work as well as IE.

    iFrames are generally a bad idea... but then again, 90% of the Internet uses IE.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •