-5

When I position my footer to the bottom of the page it postions in the middle of the page

When is set the element to position absolute and the bottom attribute equal to zero it show up in the middle of the whole page instead of the bottom. Is this because my page is bigger than one screen and if so how do I solve this?

#footer{
height: 24.72vh;
background-color: aqua;
overflow: visible;
position: absolute;
bottom: 0;

}

1 Answers1

0

the parent of element of your footer must have height:100%; and position:relative;

and footer should be last element.

OR

position:fixed, instead of position:absolute

some reference links:

https://www.freecodecamp.org/news/how-to-keep-your-footer-where-it-belongs-59c6aa05c59c/

https://codepen.io/cbracco/pen/zekgx

CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page

Ruben Marcus
  • 338
  • 1
  • 9