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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:30:35+00:00 2026-06-15T04:30:35+00:00

I am trying to achieve auto resizing of the 2nd iframe in this code,

  • 0

I am trying to achieve auto resizing of the 2nd iframe in this code,

Any help would be appreciated.

CSS

* {
    margin: 0;
    padding: 0
}
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden
}
table {
    width: 100%;
    table-layout: static;
    border-collapse: collapse
}
iframe {
    width: 100%
}
.header {
    border-bottom: 1px solid #000
}
.content {
    height: 100%
}

HTML

<table>
    <tr>
        <td class="header"><div><h1>Header</h1></div></td>
    </tr>
    <tr>
        <td class="content"><iframe name="iFrame1" height="85" src="Materials AU Stocked Header.htm" scrolling="no" frameborder="1"></td>
    </tr>
    <tr>
        <td class="content"><iframe name="iFrame2" height="100%" src="Materials AU Stocked.htm" scrolling="yes" frameborder="1"></td>
    </tr>
</table>
  • 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-15T04:30:36+00:00Added an answer on June 15, 2026 at 4:30 am

    You can do this using position: absolute with your second iframe and specifying top, bottom, left and right.

    This requires your #header and first iframe have a fixed height.

    Note I’ve put in some external websites in the iframe src for testing purposes. Replace these with your desired html pages.

    HTML

    <div id="header">
        <h1>Header</h1>
    </div>
    <iframe id="iFrame1" name="iFrame1" src="http://yahoo.com"></iframe>
    <div id="iFrame2Container">
        <iframe id="iFrame2" name="iFrame2" src="http://yahoo.com"></iframe>
    </div>
    

    CSS

    * {
        margin: 0;
        padding: 0
    }
    html, body {
        height: 100%;
        width: 100%;
        overflow: hidden
    }
    #header {
        border-bottom: 1px solid #000;
        height: 19px;
    }
    
    #iFrame1 {
        height: 80px;
        width: 100%;
        border: none;
        overflow: hidden;
    }
    #iFrame2Container {
        position: absolute;
        top: 100px;
        left: 0px;
        bottom: 0px;
        right: 0px;
    }
    #iFrame2 {
        width: 100%;
        height: 100%;
        border: none;
    }
    

    Demo

    A few extra things that I noticed in your code

    • You shouldn’t use tables for layout
    • You shouldn’t put spaces in your html filename
      • Rename Materials AU Stocked Header.htm to somethin like Materials-AU-Stocked Header.htm
    • Close tags you open
      • <iframe> needs </iframe> after it
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to achieve this effect with css3: The HTML code is cleanly something
I'm trying to achieve table similar to this using css/html only. Is it possible
Trying to achieve any moving effect while appending an element from one to another
What I am trying to achieve is editing code in vim then running make
I am trying to achieve something like this. The Expandable List consists of the
I'm having trouble trying to achieve some very basic layout behavior with Auto Layout.
I'm trying to achieve ajax-like-file-upload-using-hidden-iframe . Obviously there are many plugins available for that
What i'm trying to achieve is this: 1st- I want to query a page
I'm trying to achieve this layout on my page amongst the #about1, #about2 #about3,
The proposed UX I am trying to achieve is this: user clicks menu item

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.