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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:27:16+00:00 2026-06-04T03:27:16+00:00

I have an outer element that is a fixed size with a footer immediately

  • 0

I have an outer element that is a fixed size with a footer immediately below it. Inside the element are two sections; the first should be a fixed height and the second should expand to fill the other element but not overflow it.

Let me show you.

How do I do this? setting height: 100% on the second element causes it to oveflow the outer element and overrun the footer. The only other alternative I see is to se the height explicitly in pixels which seems like it would be a mess.

What’s the right way to do this?

Edit: setting overflow-y: hidden will work in this very limited example, but its not actually limiting section.inner2 and will look weird if for example I want to give section.inner2 a border-radius

  • 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-04T03:27:18+00:00Added an answer on June 4, 2026 at 3:27 am

    The simplest solution that I can think of (and I don’t think very much) is just using position: absolute;: http://jsfiddle.net/WLZmT/3/.

    HTML:

    <div id="outer">
        <div id="fixed">
            Fixed.
        </div>
        <div id="fluid">
            Fluid.
        </div>
    </div>
    

    CSS:

    #outer {
        position: relative;
        background: rgb(255, 200, 200);
        padding: 10px;
    
        height: 400px;
    }
    
    #fixed {
        height: 100px;
        padding: 10px;
    
        background: rgb(200, 255, 200);
    }
    
    #fluid {
        padding: 10px;
        background: rgb(200, 200, 255);
    
        position: absolute;
        top: 100px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a container of fixed size that will inside have an
I have an outer div, and inside of that, I have an inner div
If I have a list of similar elements, such that: <outer-container> <element attribute=x />
I have a very basic page with two elements, an outer green box, and
I have an outer div that is 800px wide. I have an inner div
I have two tables which I want to join together using a left outer
I have the following code that creates a draggable and droppable element/area. And when
I've heard that putting a block element inside a inline element is a HTML
Folks, Let's say that I have the following situation: <div class=outer> <div> <span> <ul>
I have an entity that is mapped with a <join> element like this: <class

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.