fix: prevent TOC and Ad Banner from overlapping navbar #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Tickets & Documents
Fixes: #3434
Description
When scrolling to the bottom of blog reading pages (
/blog/technology/[slug]or/blog/community/[slug]), the Table of Contents (TOC) and Ad Banner were overlapping the navbar due to missing z-index constraints on sticky/positioned elements.z-indexhierarchy to ensure TOC and Ad Banner stay behind the navbarChanges
z-30 max-h-[calc(100vh-100px)] overflow-y-autoto the sticky TOC containerz-30to the Ad Banner wrapperType of Change
Testing
z-40in [FloatingNavbar.tsx](https://github.com/keploy/blog-website/blob/main/components/navbar/FloatingNavbar.tsx#L43)z-30, ensuring they stay behind the navbarDemo
Before: TOC and Ad Banner overlap the navbar when scrolling to the bottom of blog posts
After: TOC and Ad Banner stay behind the navbar, respecting the z-index hierarchy
Environment and Dependencies
Checklist