
Making a smooth tool-tip-like share pop-up with JS instead of CSS
Design comparison
Solution retrospective
Managing to find a "proper" solution in JavaScript.
I would have liked that content of the pop-up in desktop and mobile were the same HTML elements, but they are not. There must be a better solution, but that is left for the next time.
What challenges did you encounter, and how did you overcome them?There was a short setback when creating a pop-up in CSS. One problem was about creating the shape, the other was that the pop-up was "cut" by the card, because the card has overflow: hidden
on itself.
The solution was to set position: fixed
on the pop-up. But that in itself made the pop-up hard to control, i.e. position properly. I had to add a parent that had position: absolute
and was easy to control.
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord