Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • No worries; if you want to test or see it; disable the position: fixed on the footer, temporarily remove a bunch of stuff from your <body>; like remove the entire <header> and almost everything else above the <footer>; just leave (or add) like a little bit of simple content that takes up a third of height of your visible screen. Now the footer should show on screen directly under that content; taking up the full pagewidth and effectively being at like top: 300px or some such. Then enable the <footer>s position: fixed again, and you'll see exactly what happens. Commented Jan 2, 2022 at 5:32
  • All that happens is the width shortens to fit the content - is that what's supposed to happen? Commented Jan 2, 2022 at 5:56
  • Yea. you basically see it retains it top and left values. The width changing is another side-effect but that wasn't so much related to the problem. Since your site had much more content initially, the footer was located way lower (i made up the 2000px-value but it could easily be something like that); and similar to in this experiment, it wouldve stayed around there Commented Jan 2, 2022 at 5:59