--- { title: "Why is z-index not working?! - Explaining CSS Stacking Context", description: "", published: '2023-01-01T22:12:03.284Z', authors: ['crutchcorn'], tags: ['webdev', 'css', 'html'], attached: [], license: 'cc-by-4' } --- [Despite some some UX headaches modals can introduce into an app](https://modalzmodalzmodalz.com/), they're still a widely used UI element in many applications today. While building sufficiently useful modals can be a challenging task, a rudimentary modal can be completed even without JavaScript. Let's use some CSS and HTML in order to build a basic modal: ```html
This is some text, pretend it's an app back here
This is some text, pretend it's an app back here