sticky-kit icon indicating copy to clipboard operation
sticky-kit copied to clipboard

Sibling column jumps to overlap sticky element as width varies

Open mikec-design opened this issue 9 years ago • 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 https://github.com/leafo/sticky-kit/issues/174 as well as { recalc_every: 1 }, neither fixed the issue.

Here's a video of the issue:

https://vid.me/WCrL

mikec-design avatar Oct 11 '16 19:10 mikec-design

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

SashaTauchen avatar Nov 07 '16 03:11 SashaTauchen

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

mikec-design avatar Dec 08 '16 04:12 mikec-design

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.

SashaTauchen avatar Dec 08 '16 21:12 SashaTauchen