gm0t / react-sticky-el

MIT License
250 stars 46 forks source link

Sticky header + sticky sidebar + footer #47

Open zhil opened 4 years ago

zhil commented 4 years ago

I have pretty complex structure on the website - Header (not sticky), large subheader (sticky), content col + sidebar (sticky), footer.

I almost did it, except footer is overlap sticky sidebar with "top: 100px !important" attribute, not sure how to fix it

I added sandbox for it https://codesandbox.io/s/jcf-bug-sandbox-vl1vv

Would really appreciate, if somebody will give any suggestions regarding how can I fix this issue image

zhil commented 4 years ago

bottomOffset should do the trick, but either I miss something, or it doesnt work

zhil commented 4 years ago

@gm0t @Scrum @jacobweber @pepijnolivier I would appreciate any suggestions regarding how can I fix this bug

Ariel-Rodriguez commented 4 years ago

@zhil i was needing the same thing you were trying to achieve. But i couldn't make it work either. I decided to start a library from scratch and provide a solution with most recent code and provide an architecture were it would be easy to contribute and bug fix.

https://github.com/Ariel-Rodriguez/react-hook-sticky

Hope this useful for more people.