Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get div to 100% height? [closed]

Tags:

html

css

I'm not entirely sure what I'm doing wrong, and I can't figure out how to Google it because a common mistake is very prevalent. I have the parent's height explicitly set, but I can't get #main-sub-content 's height to 100%.

Here's the page: http://coloryourspot.vadremix.com/

And the corresponding CSS: http://coloryourspot.vadremix.com/styles/primary/main.css

Can anyone spot the issue?

Solved: The problem was the parent element had height:auto!important;

like image 591
James Avatar asked Feb 03 '26 01:02

James


1 Answers

Remove this attribute:

div#main-content{height:auto!important}

and things works fine in Chrome.

But since your #main-sub-content is min-height:100%, your #footer-clear will be put out of screen. You may have to work that out later.

like image 182
Passerby Avatar answered Feb 04 '26 15:02

Passerby