Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting sticky-kit to work with Foundation 5 #70

Open
BenMorel opened this issue Sep 9, 2014 · 5 comments
Open

Getting sticky-kit to work with Foundation 5 #70

BenMorel opened this issue Sep 9, 2014 · 5 comments

Comments

@BenMorel
Copy link

BenMorel commented Sep 9, 2014

First of all, congratulations on this awesome piece of code, I've been looking for such a plugin for a long time!


I've been trying to get sticky-kit to work with a column layout built with Foundation 5, but failed miserably.

You can see it in action in this fiddle: http://jsfiddle.net/sp7ssjx7/

Did I do it wrong, or is there an inherent incompatibility between sticky-kit and the Foundation grid?

Getting both to work together would be a bless.

@BenMorel
Copy link
Author

BenMorel commented Sep 9, 2014

This might be related to #54, but it doesn't look like it's a problem of parseInt() vs parseFloat().

I've found however that subtracting 1px to the values returned by elm.width() and elm.outerWidth() fixes half of the problem, in the sense that the columns don't get pushed down the parent container anymore.

But even with this hack, the columns still behave weirdly (they do not stick and unstick at the right scrolling places).

@brizzo
Copy link

brizzo commented Oct 7, 2014

I am facing the exact same issue in trying to get this to work with Foundation's grid.

@rosgzc
Copy link

rosgzc commented Feb 4, 2015

Exactly the same over here.

@andrew-beck
Copy link

I was able to fix this by adding:
display: inline-block;
float: none;
to the column I was attempting to stick. Worked like a charm.

@daltonrooney
Copy link

This pull request seems to fix the problem by changing the way the box width is calculated: #98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants