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 ca...

Use Cases for Fixed Backgrounds in CSS

File this into a category of personal “CSS Ah-Ha Moments“. The background-attachment property has never seemed all that useful to me. I have always looked at it as some sort of old school design trick from the GeoCities days to get a repeating background to stay in place during scroll. See the Pen QEPQqp b...