Roel Nieskens on Nostr: Is there a way to have to elements that live in different containers be sticky on top ...
Is there a way to have to elements that live in different containers be sticky on top of each other?
I tried to sketch it: the first striped element is inside a div with another element above it. When scrolling, it needs to stick to the top. Easy peasy.
But then the second striped element, that lives in another container, needs to stick to the bottom of the top one.
I might be missing something obvious, but how to do this?
#CSS
Published at
2024-01-25 16:10:20Event JSON
{
"id": "298a27e2631417c3db7853ccd7e7269ed5df3dcb863179ad8ea112324a649c74",
"pubkey": "fd5fc007b4b179a533ceff6c577892d7c82932701d5b3c855f3f826373824f54",
"created_at": 1706199020,
"kind": 1,
"tags": [
[
"t",
"css"
],
[
"proxy",
"https://typo.social/users/pixelambacht/statuses/111817459012128918",
"activitypub"
]
],
"content": "Is there a way to have to elements that live in different containers be sticky on top of each other?\n\nI tried to sketch it: the first striped element is inside a div with another element above it. When scrolling, it needs to stick to the top. Easy peasy.\n\nBut then the second striped element, that lives in another container, needs to stick to the bottom of the top one.\n\nI might be missing something obvious, but how to do this?\n\n#CSS\n\nhttps://typo.social/system/media_attachments/files/111/817/456/461/670/661/original/eb6a17ff96c72a5b.jpeg",
"sig": "d44e5170c45a6ceb297a3c1f12f593ce361652710516618cc20237dd6c55e8b115f8f12218ffa29dda319f3f014da0ff4e5dde258544cc761f7db2ec275e024d"
}