z-index not working with position absolute

The Solution to z-index not working with position absolute is


The second div is position: static (the default) so the z-index does not apply to it.

You need to position (set the position property to anything other than static, you probably want relative in this case) anything you want to give a z-index to.

~ Answered on 2013-01-23 15:50:06


Most Viewed Questions: