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 7757547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:07:30+00:00 2026-06-01T13:07:30+00:00

I have a page that loads an external HTML page into an iFrame. There

  • 0

I have a page that loads an external HTML page into an iFrame. There are two problems I am facing with this:

  1. The iFrame is always a fixed height, but I want it to expand
    vertically depending on the height of the content.
  2. The content inside the iFrame can not inherit the CSS styles
    attached to the HTML page that contains it. The HTML inside the
    iFrame has to have it’s own link or separate style sheet.

I could be wrong about either of those points, so if I am, please let me know and then I will continue to use the iFrame.

Otherwise, is there a simple Javascript call that can load an external HTML file into a DIV?

Just to be clear, since it seems some people have misunderstood me:

I am asking how to replace an iframe with a DIV and Javascript in order to get the functionality I mention above. I am not looking for ways to make iFrames behave differently.

(I thought this would be fairly common, but most of the questions and information I’ve found in this site and on the web seems to be situation specific and asks for additional functionality that I don’t need and complicates the issue. However, if I’ve missed something and this is a duplicate, I wouldn’t be offended if this got closed.)

  • 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-06-01T13:07:31+00:00Added an answer on June 1, 2026 at 1:07 pm

    You can make an ajax call to fetch your html page and add it to the div. For example using JQuery:

    $.get('yourPage.html', function(data) {
    $('#yourDiv').html(data);
    });

    Read more at: http://api.jquery.com/jQuery.get/

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

Sidebar

Related Questions

I have an external JS file that I load into my HTML <script type=text/javascript
I have a widget-like block of HTML+JavaScript that people can copy/paste into their HTML-page
I have a page that loads a bunch of scripts to prepopulate dropdowns and
I have a page that loads other pages via Ajax (think frames, except without
I have a .aspx page that loads three separate .ascx controls to represent adding,
I have an asp page that loads a response user=exists everytime I try to
I have a web application that has a page that loads the content from
The Idea I have a main PHP page that loads content in DIV's from
i have an application that loads the page content. I use the WebClient class.
I have a website that requires a very large background image. The page loads

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.