FlyingIsFun1217 Posted June 13, 2008 Share Posted June 13, 2008 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 More sharing options...
FlyingIsFun1217 Posted June 13, 2008 Author Share Posted June 13, 2008 Just a note, the attribute min-height apparently needs it's parent container to have a set height, so I added to 'body': 'height: 100%', yet it still doesn't work! FlyingIsFun1217 Link to comment https://forums.phpfreaks.com/topic/110065-solved-min-height-x-doesnt-work/#findComment-564942 Share on other sites More sharing options...
FlyingIsFun1217 Posted June 13, 2008 Author Share Posted June 13, 2008 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 Link to comment https://forums.phpfreaks.com/topic/110065-solved-min-height-x-doesnt-work/#findComment-564950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.