Reputation: 25
Is z-index
only used when you set an element's position to absolute
or it can also be used with an element having position set to relative
?
Thanks
Upvotes: 1
Views: 309
Reputation: 7494
Following the W3C specification:
z-index only works on positioned elements (position:absolute, position:relative, or position:fixed).
source: http://www.w3schools.com/css/pr_pos_z-index.asp
Upvotes: 1