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

  • SEARCH
  • Home
  • 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 7189033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:12:54+00:00 2026-05-28T19:12:54+00:00

Here is very tricky situation i have tried many things but cant figure it

  • 0

Here is very tricky situation i have tried many things but cant figure it out. I have following iframe:

<div id="content"> <iframe id="iF" name="if" marginwidth="0" marginheight="0" frameborder="0" src=""></iframe>
</div>

Source is entered through jquery to this. Problem is when source is entered it is two big in height and width. So i see two scroll bars. Is there anyway that iframe data will move with main page scrollbar. Rather than adding two different scrollbars.
Here is an image of what i am seeing now:
double scrollbars

  • 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-28T19:12:55+00:00Added an answer on May 28, 2026 at 7:12 pm

    You need to resize it after the content have been filled, and this can done by using Javascript.

    <script type="text/javascript">
        function iframeLoaded()
        {
            var iFrameID = document.getElementById('idIframe');
    
            if(iFrameID)
            {
                // here you can meke the height, I delete it first, then I make it again
                iFrameID.height = "";
                iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px";
            }   
        }
    </script>   
    
    
    <iframe id="idIframe" onload="iframeLoaded()" ...
    

    Other solution is to add height and width to a persent value, like 100% to get all the width/height of your window, and hide the scroll bars of iframe.

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

Sidebar

Related Questions

I have a very tricky question for you all Suppose I have the following
I have what seems to be a very tricky situation. I would like to
Very confused here, trying out the yuicompressor on a simple javascript file. My js
Now this is a tricky problem for which I'm not able to figure out
I have a tricky situation where I need to duplicate a table row, and
Ok, this is a little tricky to explain but can be very easy to
It seems to me that Guice implementation is doing some very tricky things when
I have a tricky problem to deal with. Here's the scenario: I have an
Is there some trick that I'm missing here? I've created a templated control, very
I made a research and all posts here are very blury regarding this issue.

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.