When you use the z-index property to define a stacking order for your styles, you need to also use the position property. If the position is not defined (either relative or absolute), the z-index will have no effect on the positioning results. Items will be stacked in the order they display on the page.

