Last Updated: February 25, 2016
·
467
· jamiethepiper

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)