CSS Footer

How we make footer moveable as page contain not fix in bottom or how me make footer not in bottom it can change as page contains height or view in top like;


. HEADER.
. BODY
.-------------------------------
. FOOTER
.-----–-------------–--------

I am using this css now:




#footer_container {
    font-size:13px;
    background: red;
    border:1px solid red;
    height:initial;
    bottom:0px;
    left:0;
    position:fixed;
    width:100%;
}

#footer {

    line-height:none;
    margin:0 auto;
    width:auto;
    color:#fff;
    text-align:center;
}

If you simply want your footer to appear at the end of your content, however long or short that may be, then you shouldn’t need to do anything special to achieve that; that is normal behaviour.

Your snippet of CSS without any accompanying HTML is not very helpful, but at a guess I’d say remove

    bottom:0px;
    left:0;
    position:fixed;

from #footer_container.

See https://tympanus.net/codrops/css_reference/position/

1 Like

Thank you!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.