0

How can I make footer web component remain at the bottom of any page where it will be used? regardless of whether the content of the page is enough or not.

I have tried adding css properties such as position: fixed; and bottom: 0; but on same pages the content goes behind the footer just remains in place.

Jordan Running
  • 102,619
  • 17
  • 182
  • 182
Lenny Kiano
  • 120
  • 1
  • 14

1 Answers1

0

if you do position fixed bottom 0, you can add bottom margin/padding to the underneath element to create space so that the footer doesn't overlap the content

CSS

.footer {
    position: fixed;
    bottom: 0;
    height: 50px;
}

.content {
   margin-bottom: 50px;
}
David Ko
  • 304
  • 1
  • 3
  • 11