Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Lachlan ∆
Lachlan ∆
8,026 Points

Make a popup fixed and hover above all other content.

I have a popup on my project, I need to to be above all other content no matter what, and fixed in the center near the top of the page. z-index puts it above but it still gets moved around by other content.

2 Answers

Lachlan ∆
Lachlan ∆
8,026 Points

This did the trick

  right: 0;
  left: 0;
  margin-right: auto;
  margin-left: auto;
Gianmarco Mazzoran
Gianmarco Mazzoran
22,076 Points


have tried:

.your-pop-up {  /* the selector of your pop-up */
  position: fixed;