Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7158965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:09:10+00:00 2026-05-28T13:09:10+00:00

I am experiencing a problem with a dynamically sizing iFrame. Essentially it works perfectly

  • 0

I am experiencing a problem with a dynamically sizing iFrame. Essentially it works perfectly in IE 7,8,9 but only in Quirks mode and runs correctly in chrome and firefox. So my problem relates to Standard document modes for ie 7,8,9.

When in IE in standard form it squeezes the content into a scrollbox about 200px in height with a vertical scrollbar only. I can edit the style to use a specific height i.e 600px instead of height 100% which will look fine…however the nature of the content varies a good bit in terms of height.

Does anybody have any solutions to this? Seems a bit odd!

Scrolling=no maintains the squeezed content, I just can’t scroll down then. overflow in CSS is doing nothing. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:09:11+00:00Added an answer on May 28, 2026 at 1:09 pm

    I have a solution that runs in IE 7 +
    It uses jQuery

    MyLibrary = {
        iframeApp: function(options) {
            var $app = $(window[options.name]),
                $appContainer = $(options.wrapperId);
    
            window.setInterval(function() {
                var frameEl = $app[0].frameElement,
                    frameDoc = 0,
                    height = 0;
    
                if (frameEl.contentDocument !== undefined) {
                    frameDoc = frameEl.contentDocument,
                    height = frameDoc.height || frameDoc.body.offsetHeight;
                } else if (frameEl.document !== undefined && frameEl.document.documentElement !== undefined) {
                    frameDoc = frameEl.document.documentElement,
                    height = frameDoc.offsetHeight;
                }
                $appContainer.css("height", height);
            }, 500);
        }
    }
    

    Thats the javascript code. Here is the html.

    <div id="iframe-runner">
        <iframe scrolling="no"frameborder="0"name="myiframe"class="myiframe"src="http://mysrc.com/sweet-i-frame-app"width="100%"height="100%"></iframe>
    </div>
    
    <script type="text/javascript">
        $(function() {
            MyLibrary.iframeApp({
                name: "myiframe",
                wrapperId: "#iframe-runner"
            });
        })
    </script>
    

    Running it in one page:

    <script type="text/javascript"src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
    <div id="iframe-runner">
        <iframe scrolling="no"frameborder="0"name="myiframe"class="myiframe"src="http://mysrc.com/sweet-i-frame-app"width="100%"height="100%"></iframe>
    </div>
    <script type="text/javascript">
        $(function() {
            iframeApp({
                name: "myiframe",
                wrapperId: "#iframe-runner"
            });
        })
        function iframeApp(options) {
            var $app = $(window[options.name]),
                $appContainer = $(options.wrapperId);
    
            window.setInterval(function() {
                var frameEl = $app[0].frameElement,
                    frameDoc = 0,
                    height = 0;
    
                if (frameEl.contentDocument !== undefined) {
                    frameDoc = frameEl.contentDocument,
                    height = frameDoc.height || frameDoc.body.offsetHeight;
                } else if (frameEl.document !== undefined && frameEl.document.documentElement !== undefined) {
                    frameDoc = frameEl.document.documentElement,
                    height = frameDoc.offsetHeight;
                }
                $appContainer.css("height", height);
            }, 500);
        }
    </script>
    

    MAKE SURE you update the iframes SRC

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The build machine at work has many projects, but we are only experiencing a
I'm no hero with .htaccess, but I'm experiencing a problem that I think might
I'm experiencing this problem: I want to add the Google Maps API to my
I am experiencing a problem with the following code in some versions of Internet
I have a Windows Server 2003 64-Bit VPS, and I'm experiencing a problem with
I'm new to web-development in ASP, and I'm experiencing a problem where I try
I'm experiencing this weird problem which my scrollbar jumps by itself to somewhere that
I'm experiencing the same problem in this previous stackoverflow.com post . Specifically, I seem
I'm experiencing a strange problem when trying to count the entities in a managed
We are experiencing a performance problem when communicating with the active directory using System.DirectoryServices.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.