Skip to content
Advertisement

Fixed Left- 0 (TailwindCss) overlaping body content

i have an issue on my project i’am working on, i have a SIDEBAR and a TOPHEADER(NAVBAR).., now the issue starts when i want to have a FIXED SIDEBAR without it obscuring other page elements like TopHeader/Navbar and body content to the left side of the page.. tried adding ml-20 on topHeader div but that didnt help as it just opens up a whitespace on the left,,also tried using Space-x-20 class that also didnt help because it only pushed the body content to the right just like iwanted but theres another issue , the TopHeader is stuck on the left ..on this project iam using Tailwindcss to style the project would appreciate the help. This is how it looks like with the “Fixed left-0 ” enter image description here enter image description here

How I want it to look: enter image description here enter image description here

JavaScript

JavaScript

Advertisement

Answer

i finally found a good fix for my issue i had above , instead of using tailwind default ” fixed left-0 ” , i ended up using StickyNode and it kind of solved every bit of problems i had by wrapping my sidebar with stickynode component like this:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement