2 Replies Latest reply: Aug 16, 2013 5:22 AM by GESYMSB RSS

    Learning the Iframe.....

    GESYMSB Community Member

      <iframe src="http://www.w3schools.com"></iframe>

      This page give you some good info, but I got no idea how to implemented: http://www.w3schools.com/tags/tag_iframe.asp


      How can I control the Attributes of an iframe?
      I had searched all around the web and cant find an example to experiment with.

      I need to change the size of the iframe to match the exact content of a div box.

       

      Thanks

        • 1. Re: Learning the Iframe.....
          Nancy O. CommunityMVP

          An inline frame pulls another HTML page into the parent page.  Sort of a page within a page. 

           

          Copy & paste this code into a new, blank document.  Adjust CSS height and width values as needed.

           

           

          <!doctype html>
          <html>
          <head>
          <meta charset="utf-8">
          <title>Iframe Test</title>
          <style>
          
          body {background-color:#09C;}
          
          div {
          width: 70%;
          margin: 0 auto;
          padding:2%;
          background-color: #CFF;
          }
          
          iframe {
          border:none; 
          overflow:auto;  /**scrollbars when needed**/
          height: 200px; /**adjust as required**/
          width:100%;  /**adjust as requires**/
          }
          </style>
          
          </head>
          
          <body>
          
          <div>
          <h2>This is an iframe</h2>
          <iframe src="http://example.com"></iframe>
          </div>
          
          </body>
          </html>
          

           

           

           

          Nancy O.

          • 2. Re: Learning the Iframe.....
            GESYMSB Community Member

            Nancy if I could I will buy you all the BigMacs and Whoppers that I can find!

             

            (\/)     Thanksssssssssssssssssssssss