Remove border from sticky box

How can I create this simple functionality that - box position: sticky then we have border - otherwise no border
4 Replies
MarkBoots
MarkBoots2y ago
don't think there is a native css way, but with a bit of js (intersection observer) it's possible little demo https://codepen.io/MarkBoots/pen/NWzEEBw
godlike
godlike2y ago
Thanks @MarkBoots! @MarkBoots Can you share this codepen code again? Getting 404 when I'm going on the link Nvm, did it by using intersection observer
MarkBoots
MarkBoots2y ago
I was just remaking it for you. But good you could manage to solve it. For the future, when you post a question, check regularly if someone answers. Only 30 minutes after your original post, I responded with a possible solution. You just left it there for a whole week. People here a happy to use their spare time to help others. Don't waist their time. The reason why the link didn't work was because I removed it after 3 days. I don't want to pollute my personal codepen profile with random codesnippets that no one uses
MarkBoots
MarkBoots2y ago
For if you change your mind here a backup of my code (im not gonna make another one in a codepen)
Want results from more Discord servers?
Add your server