leafo / sticky-kit

A jQuery plugin for creating smart sticky elements
http://leafo.net/sticky-kit
2.9k stars 517 forks source link

script not working because of conflict with page structure/css #250

Open elphin opened 7 years ago

elphin commented 7 years ago

Hi, I am fully aware that this has nothing to do with your plugin. It is caused by the way my page is constructed.

I use thrive architect (a page builder) for this page. The builder places the content container inside a wrap div with a set width (940px) for the content-container and auto margin to center the content. To be able to use full-width sections the script adds the width of the screen to a div with a negative positioning of the (width-of-the-screen - content-container)/2.

Using your plugin on such a div does not work because on enabling and disabling the stickyness the width and size somehow get's recalculated and the div jumps to the left; leaving a gap to the right.

Do you understand the problem? Is there a solution to this situation?

A million thanks if this can get solved... :|