0

How position:absolute,position:relative,z-index work please explain with example

24th Dec 2016, 6:59 AM
Rajesh Sahu
Rajesh Sahu - avatar
2 Answers
+ 4
An absolute position element is positioned relative to the first parent element that has a position other than static. If no such element is found, the containing block is <html>. Absolutely positioned elements are removed from the normal flow. The document and other elements behave like the absolutely positioned element does not exist. z-index decides what overslap what: https://code.sololearn.com/577/#css
24th Dec 2016, 7:16 AM
Nahuel
Nahuel - avatar
+ 1
*overlap
24th Dec 2016, 10:55 AM
Rishi Anand
Rishi Anand - avatar