Select Page

Category: fixed position

Sticky as a Local Fixed?

Lemme set the stage a bit here. You have a website and, like most, it scrolls. This website will have modals. You’ll probably position: fixed the modal so that it’s predictably positioned regardless of scrolling. It’s possible the modal itself will scroll. Notice the modal has a close button. We can position: absolute that in the upper-right corner, but if our modal scrolls, it’s a problem. We’ve lost the close button behind the scrolling. Should be a job for more position: fixed, right? Not really, sadly, as there is no such thing as a local context for position: fixed....

Read More
000webhost logo