Grow your CSS skills. Land your dream job.

Background Not Extending Full Height of Page

  • Anonymous
    # February 12, 2011 at 10:09 pm

    http://aarongmoore.com/test/layout.html

    I’m working on a new layout design for my personal website. The transparent div layer is set to “min-height: 100%” but for some reason it doesn’t go all the way to the bottom of the browser window. If anyone can help me figure out how to fix this, I’d greatly appreciate it. Thanks!

    # February 12, 2011 at 11:11 pm

    I think it is only going as far as there is content. This happens with the height because of something called margin collapsing. Even though you are telling the div to stretch all the way down, the margin will collapse to where there is content. However, I applied overflow: hidden; to #contentBg in your css and for some reason it worked as you wanted it. I tried the overflow: hidden just to check if that was what I thought. Try it out and see if it works.. hope this helped…

    Anonymous
    # February 12, 2011 at 11:26 pm

    That does seem to have solved the problem. Thank you very much renancoelho!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".