SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do i make iframe height=100% in firefox

    the iframe goes 100% height in IE, but not in firefox

    how can I do this in firefox?

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    This works fine for me
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
     <head>
      <title>iframe example</title>
      <style type="text/css">
       html, body, div, iframe { margin:0; padding:0; height:100%; }
       iframe { display:block; width:100%; border:none; }
      </style>
     </head>
     <body>
      <div>
       <iframe src="http://example.org/">
        <p><a href="http://example.org/">example.org</a></p>
       </iframe>
      </div>
     </body>
    </html>
    Simon Pieters

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in FireFox the iframe is the correct width[500px], however the 100% height does not go 100% but has a scroll bar.... what is wrong?

  4. #4
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Nothing is wrong that is how a 100% <iframe> should be displayed FF gets it right.

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i did not set the html { } in CSS, works now .. thanks!!! [it was my mistake]

  6. #6
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by zcorpan
    Hi,

    This works fine for me
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
     <head>
      <title>iframe example</title>
      <style type="text/css">
       html, body, div, iframe { margin:0; padding:0; height:100%; }
       iframe { display:block; width:100%; border:none; }
      </style>
     </head>
     <body>
      <div>
       <iframe src="http://example.org/">
        <p><a href="http://example.org/">example.org</a></p>
       </iframe>
      </div>
     </body>
    </html>

    I tried the above code for making the Iframe into 100% height.....But it doesnot work for me....Here is my actual code....If there is any thing wrong in it please tell me and help me to make and <iframe height into 100%.
    Thanks

    Here is my code.....

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
    <head>
    <title>iframe example</title>
    <style type="text/css">
    html, body, div, iframe { margin:0; padding:0; height:100%; }
    iframe { display:block; width:100%; border:none;height:100%; }
    </style>
    </head>
    <body>
    <div>
    <iframe name="I3" src="http://www.mlsb.com/mls/featured.cfm?cid=8058" marginwidth="0" marginheight="0" vspace="0" hspace="0" frameborder="1" width="100%" height="100%" scrolling="no"></iframe>
    </div>
    </body>
    </html>

    Thanks

  7. #7
    Non-Member
    Join Date
    Jul 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can set iframe to 100 height if you put this in your head section

    <style type="text/css">
    html,body{
    width:100%;
    height:100%;
    margin:0px;
    padding:0px;
    }
    </style>

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2005
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan View Post
    Hi,

    This works fine for me
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html lang="en">
     <head>
      <title>iframe example</title>
      <style type="text/css">
       html, body, div, iframe { margin:0; padding:0; height:100%; }
       iframe { display:block; width:100%; border:none; }
      </style>
     </head>
     <body>
      <div>
       <iframe src="http://example.org/">
        <p><a href="http://example.org/">example.org</a></p>
       </iframe>
      </div>
     </body>
    </html>
    thx
    Web Application Development & Maintenance

  9. #9
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    iframe height problem in firefox

    Hi,
    I am having a similar problem with Iframe height in Firefox.

    The content length of my Iframe is about 55000.And I have set the Height of Iframe as 60000.But the Iframe displays contents only till around 33000(px) and shows a scrollbar.Leaving the extra space as blank.It somehow does not use the whole space , and always limits itself to 33000.Is this a problem with Firefox???

    Thanks for your help,
    SharathChandra.

  10. #10
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To make the iframe stretch 100% height, just make sure all the divs surrounding the iframe are set to height: 100% in the css aswell. That includes body and html.


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
  •