Skip to content

[Help] How to use sticky for each segment #1482

Discussion options

You must be logged in to vote

@YauKeng OK. Now I can reproduce it with smaller screen.

This issue causes because negative margin set on the cards container: margin: -0.875em -0.5em. It is less noticeable in large screen, but huge impact in smaller screen because of em unit as your example.

So, with very small height of your sticky container with 14px is totally covered by the cards container.

The cards container need to have negative margin to cover the space taken by the card elements inside.

So, I guess you should wrap your cards within another container and add the top margin or padding.

And your sticky elements also have spaces such as margin, and padding around the box. So, the calculation of the sticky position …

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lubber-de
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1482 on October 07, 2020 16:02.