Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to stick the footer to the bottom of the page even with scrolling?

I checked and tried some solutions on this famous problem but I still can’t make it works. My footer is actually at the bottom of the page but when I need to scroll it doesn’t stay on the bottom (it’s at the bottom of the screen but once I start scrolling it stays in the middle of the screen instead of sticking to the bottom)

.footer {
    background-color: rgb(10, 4, 22);
    bottom: 0 !important;
    position: absolute;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
}

What am I doing wrong ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

absolute is tied with the content, if you need the element to be tied to the window instead, you need position: fixed

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading