My content block has text that scrolls when it becomes too large. I'm trying to create an overlay div on top of this block, and I have implemented a solution in my example.
I encountered issues where setting position: fixed
for the overlay prevents it from adjusting to the size of its parent wrapping div. On the other hand, using position: absolute
allows the overlay to fit within the wrapper but causes it to move with the scrolling text.
Is there a way to address this challenge without resorting to JavaScript?