treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] footer doesn't stick at bottom of page

  • Hi all,

    I've got a little problem..
    My footer used to stick to the bottom of the page, but for some reason it doesn't anymore on some pages where content is little, like my portfolio.
    Does anyone have an idea to fix it.
    FYI: I don't mean the position: absolute; solution
    It only needs to appear at the end of the page without any margin.

    My website is at http://www.eclipse-webdesign.nl/portfolio/

    Thanks in advance
  • Oh yeah, the problem only appears in larger resolution screens.
  • Add to CSS:

    .html {
    height: 100%;
    }
    #container {
    min-height: 100%;
    _height: 100%; /*for ie6*/
    }
    #footer {
    height: 215px;
    margin-top: -215px;
    }

    and change:

    #main-content {
    ...
    margin-bottom: 265px;
    ...
    }
  • Thanks a lot Panenko, works like a charm. I kinda lost my way for a second.