-1

I have a problem with the footer in HTML and CSS. I want to put it down using :

position: absolute;
bottom: 0px;`

It puts it down but If the page has a scroll, it does not drop it to the end.

Rajat Jain
  • 1,339
  • 2
  • 16
  • 29
  • add a dummy div at the end of your page, with the same height as your footer. – Ian Rehwinkel Jun 09 '18 at 17:18
  • This was already answered here: https://stackoverflow.com/questions/18739937/how-to-keep-footer-at-bottom-of-screen Cheers – Valixx Jun 09 '18 at 17:23
  • 2
    Possible duplicate of [How do you get the footer to stay at the bottom of a Web page?](https://stackoverflow.com/questions/42294/how-do-you-get-the-footer-to-stay-at-the-bottom-of-a-web-page) – Adrian W Jun 09 '18 at 19:29

1 Answers1

1

Use this CSS property in place of absolute

position: fixed;

Rajat Jain
  • 1,339
  • 2
  • 16
  • 29
  • This is good solution and I now use it. But I need to put a footer to down of page. –  Jun 09 '18 at 17:22
  • put bottom value equal to the height of the footer. Or you can use 'margin-bottom' property on which you have put position fixed. the value of 'margin-bottom' equal to the height of the footer. – Rajat Jain Jun 09 '18 at 17:25
  • 1
    Please send the code via codepen or any other source. So, That I can debug. – Rajat Jain Jun 09 '18 at 17:35