Jump to content

[SOLVED] Min-Height: X% Doesn't Work?


FlyingIsFun1217

Recommended Posts

Hey!

 

I've got a div that is supposed to be filling the users browser screen, until something comes to expand it. So what I have is:

 

#mainContent
{
width:				100%;
height:				auto;
min-height:			        70%;
background:			#D2D6F5;
}

 

The rest of the divs that are stacked by it, add up to 30%, so I figured as long as the min-height is 70%, it'll fill it up (until it needs to grow). Thing is, obviously it isn't working (else I wouldn't be here!), I'm assuming because of the value. Do the values for min-height need to be in pixels, not percentages? If so, is there any way that I can get it to expand to 70% of the browser real estate?

 

Thanks!

FlyingIsFun1217

Link to comment
https://forums.phpfreaks.com/topic/110065-solved-min-height-x-doesnt-work/
Share on other sites

Ahh, was just missing a ';' after my height: 100% in the body.

 

For anybody else wanting to fill the rest of a page with a div that can expand:

 

body {height: 100%;}
#divContainer {min-height: X%; height: auto;}

 

FlyingIsFun1217

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.