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

ngSticky doesn't work if applied to the nearest element to <body>. #172

Open
neesonqk opened this issue Dec 14, 2016 · 3 comments
Open

ngSticky doesn't work if applied to the nearest element to <body>. #172

neesonqk opened this issue Dec 14, 2016 · 3 comments

Comments

@neesonqk
Copy link

Have this:

<body>
   <div sticky>ABC</div>
   <div sticky>123</div>
</body>

ABC doesn't stick to top 123 does.

@ghost
Copy link

ghost commented Jan 17, 2017

+1 having a very similar issue, did you find a way around this?

@neesonqk
Copy link
Author

@ccooper93 I assume you must are using bootstrap right? I figured out once bootstrap was applied, then this issue was reproduced. I have no time to investigate which CSS rule actives this issue, I inserted a blank div above the first div element with a very small width and height for the temporary solution.

<body>
   <div sticky style='width: 0.01em; height: 0.01em'></div>
   <div sticky>ABC</div>
   <div sticky>123</div>
</body>

@ghost
Copy link

ghost commented Jan 17, 2017

@neesonqk Im using foundation 6 must cause the same/similar issue. Thanks for the suggestion, i'd added another sticky element and hidden it. Thats a nicer workaround!

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

1 participant