0

I'm working on a static site that has a side nav on some pages and the nav is meant to stick to the bottom of the screen while scrolling. How can I get the nav to stop sticking at the bottom of the parent container? The nav should stay inside the parent.

Right now it continues to stick even after the container is out of view and eventually overlaps the footer.

Here's the demo site:

https://blissful-kare-3ae082.netlify.app/checklist.html

1 Answers1

0

Your element has the attribute "fixed-bottom" as one of its classes. This will affix the y-axis placement of your navigational element to the bottom of the screen, not to the bottom of the parent container.

There are a couple of things you can do to clean this up. If you just want it not to overlap, you can add padding to the bottom of your element; I found that padding it with 100px worked cleanly as in the picture below.

Screenshot of the sample site with padding

You may also look to affix it to the actual parent container with usage of the "relative" tag, the solution of which is discussed in various other posts on this site: Fixed position but relative to container

Aaron Morefield
  • 952
  • 10
  • 18