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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:55:32+00:00 2026-05-24T10:55:32+00:00

I have a situation where I am trying to make an element occupy 100%

  • 0

I have a situation where I am trying to make an element occupy 100% of the height of its container – and the container element only has min-height specified. Unfortunately, when I do this, the height directive is ignored. Here is an example. The “b” div, the red one, should fill the entire parent. It doesn’t, not in IE7, Chrome, or FF3.6.

If I had “height: 1px” to the container, the “a” div, then “b” is stretched to the entire height of “a”. See here. But this only in FF3.6 and IE7, not in Chrome. So I guess I am doing something wrong here.

I feel like this is a common problem that there must be a solution to that I’m just not seeing. What is the best way to achieve stretch-to-height in this case?

  • 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-24T10:55:33+00:00Added an answer on May 24, 2026 at 10:55 am

    Your CSS means that the child element’s height is 100% of the specified height of the parent element. If you do not specify a height for the parent, then the 100% doesn’t mean anything. Hence it doesn’t work.

    What you want can be achieved by using position:relative on the parent and position:absolute on the child:

    http://jsfiddle.net/57EZn/25/

    It’s not a beautiful solution but it does what you are after.

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

Sidebar

Related Questions

I'm trying to make sense of a situation I have using entity framework on
I have a unique problem/situation here. Trying to make it as simple as possible.
I have a situation that I'm trying to make work with an array ,
We have a situation where we are trying to add two UITableViews inside a
I have a typical definition/instance situation in my data modeling. I'm trying to store
I'm trying to figure out how to handle this situation. I have the following
I am trying to make SELECT statement for following situation and need help to
I have a situation where lets say i'm trying to get the information about
I've been trying to make my own plugin system. I have 2 separate projects.
I have an interesting situation I am trying to script. I have a program

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.