Faisal Deedar
Faisal Deedar

Reputation: 25

CSS: Absolute Position and Z-index

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

Answers (1)

Dor
Dor

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

Related Questions