How to integrate iframe with 100% height and with page scrollbars

I want to insert a iframe in to a webpage with following requirements:

  • iframe height must be 100% - it should stretch the height with its content.
  • iframe scrollbars should not be visible, but the page scrollbars should be there with relevant to the height of the iframe contents.
  • iframe source is from a different domain.
  • Once the iframe is integrated, the web page should be as a single normal web page. I have styled the page and the iframe source page to match each other.

    I tried different solutions by searching, but so far no luck.

    Please give me a help

    Thank You


    use css as

    iframe{
    height: 250px; // whatever you want
    }
    

    Link DEMO


    try this code...

    <!DOCTYPE html>
    <html>
    <head>
    <title>iframed site</title>
    <style>
    .restricted{
        width:100%; 
        height:100%; 
    
        overflow-x: hidden;
    
        -ms-overflow-x: hidden; 
    
    
    }
    </style>
    </head>
    
    <body>
    <iframe src="http://www.mukhesh-blog.blogspot.com" class="restricted"></iframe>
    </body>
    </html>
    

    or this....

    <!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>
    
    链接地址: http://www.djcxy.com/p/88264.html

    上一篇: 内部div高度固定的iframe

    下一篇: 如何整合100%高度和页面滚动条的iframe