I am dealing with a situation where I have a div named "Main_Card" containing text and an icon. When the icon is clicked, it moves the "Main_Card" along with everything inside of it. The challenge arises when I need to set the icon's position as either relative or absolute while also ensuring that Main_Card has overflow-y set to auto for scrolling purposes on smaller screens.
The issue occurs when Main_Card's content needs to be scrolled - not only does the text scroll properly, but the icon also scrolls along with it. Setting the icon's position to fixed is not a viable solution as it would fix the icon to the entire page rather than just within Main_Card.
Is there a way to make the icon unscrollable in this scenario? Any suggestions would be greatly appreciated. Thank you and have a wonderful day!