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 trial1 Answer
Steven Parker
231,275 PointsThe z-index value only affects items that share the same positioning context. Elements in a higher-priority context will appear on front of those in a lower context regardless of z-index values.
One quick trick to move something to the front is to give it fixed positioning. Otherwise you might have to juggle the positioning contexts used on the page.
For more details see the MDN page on Positioning.