Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Place footer at bottom of page

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38666
    hettzdesigns
    Member

    Hi
    I have used body tag as wrapper and given it the fixed width. But now I am not able place my footer at bottom. This are my code

    body
    {
    width:960px;
    min-height:100%;
    height:auto;
    height:100%;
    margin:0 auto;
    background:#f9f7f4;

    }

    footer
    {
    width:100%;
    height:165px;
    background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #525968), color-stop(100%, #3a404d));
    clear:both;
    position:absolute;
    left:0px;
    bottom:0px;

    }

    If I use div wrapper, I am able to place footer at bottom. But I would like to use body itself as wrapper. Does anyone have solution to it. I have tried all thing like giving padding as same as footer height.

    #104924
    Senff
    Participant

    Not sure if using the BODY as the wrapper is the way to go, I would just use a DIV for that.

    To keep the footer at the bottom, you gotta figure out what to do if the content does not fill all the screen (footer should be at the bottom of the page?) and what to do if the content is more than the screen (footer should be coming right after the content?). If that’s what you want, I’d just go with the CSS sticky footer method.

    #104933
    rmlumley
    Member

    Is there a reason you don’t want to use a div wrapper?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.