HTML Element Stacking Order
1.The stacking context's root element
2.Positioned elements (and their children) with negative z-index values (higher values are stacked in front of lower values; elements with the same value are stacked according to appearance in the HTML)
3.Non-positioned elements (ordered by appearance in the HTML)
4.Positioned elements (and their children) with a z-index value of auto (ordered by appearance in the HTML)
5.Positioned elements (and their children) with positive z-index values (higher values are stacked in front of lower values; elements with the same value are stacked according to appearance in the HTML)
Written by Jamie Piper
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Stack
Authors
seuros
3.169K
aniketpant
768
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#