Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    91
    Thanks
    19
    Thanked 0 Times in 0 Posts

    large white space after auto resized iframe

    I used code at http://www.codingforums.com/showpost...6&postcount=46 for auto resizing iframe.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html>
    <head>
    <title>test-paper</title>
    <script language="javascript" type="text/javascript">
    function resizeIframe(obj) {
            obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
            obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
        }
     </script>
    </head>
    
    <body>
    <iframe id="content" name="content" frameborder="0" scrolling="no" width="100%" src="./test-paper.php" onload='javascript:resizeIframe(this);'></iframe>
    <body >
    
    </body>
    </hrml>
    This code for "2. BODY" at the attached pictiure. And it works, but there are two problems.

    1. At firefox there is a large white space after auto resized iframe - that is "4. White Space" at the attached picture.

    2. At IE there is 10 times larger white space after auto resized iframe - that is "4. White Space" at the attached picture.

    Please let me know how to remove these white space.

    Thanks in advance.
    Attached Thumbnails Attached Thumbnails large white space after auto resized iframe-20120718_iframe_1.jpg  


 

Posting Permissions

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