leafo/sticky-kit

Sibling column jumps to overlap sticky element as width varies

Opened this issue · 3 comments

I have a two column FAQ layout with the question on the left and answer on the right. The column width's are percentage based as well. As I resize the page, at certain widths the right column will jump to the left and overlap the sticky column and then jump back to the correct layout.

I've tried using the code from #174 as well as { recalc_every: 1 }, neither fixed the issue.

Here's a video of the issue:

https://vid.me/WCrL

Did you find a solution since you posted this question? I'm having exact same issue.

Unfortunately not. I just ended up having to design the page without sticky-kit.

After digging around for a while in related threads, I ended up changing the instances of elm.outerWidth() to elm[0].getBoundingClientRect().width, and it worked for me.