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 trialJonathan Newman
5,219 PointsElement stacking: Why isn't the banner on top of main-header?
If elements are laid in stacking order of elements later in HTML being on top, why doesn't the banner cover the main-header before the z-stack property is applied?
Jonathan Newman
5,219 PointsHi Kartikey, thanks for responding.
I just noticed that the figure element has a 'position: relative' property. I think you meant: "Header include position:fixed so it have some z-index value & after figure contains position:relative which mean it also have some z-index value which is greater than previous positioning element index that's why figure element overlapping the header."
Thank you for helping me figure this out!
Uriah Nevins
1,121 PointsCould you post the code?
Kartikey Shahi
Courses Plus Student 2,002 PointsKartikey Shahi
Courses Plus Student 2,002 PointsHey Jonathan, banner doesn't include any positioning property the stack order in html is according to sequence of element with positioning ... Header include position:fixed so it have some z-index value & after header <figure> contain position:relative which mean it also have some z-index value which is greater than previous positioning element index that's why figure element overlapping the header.