Results 1 to 2 of 2

Thread: automatic iframe height?

  1. #1
    Join Date
    Oct 2007
    Posts
    103

    automatic iframe height?

    Hi, I have an iframe that calls for a php file. I want the iframe heigth to adjust itself automatically according to the total height of lines of text displayed by the php file. How can I do that?

  2. #2
    That's a tough one, I don't know if that's possible. I did find this snippet though.

    Code:
    
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
    html, body{
    height:100%;
    }
    #size {
    width: 50%; /* Set to fit your needs */
    height: 100%; /* Set to a minimum height as per your needs */
    }
    </style>
    </head>
    <body>
    <iframe id="size" src="http://www.google.com"></iframe>
    </body>
    </html> 
    
     


    Alex

Posting Permissions

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