+ 2

pls What do they mean by this?

The element's position is relative to the first positioned parent element in absolute position

22nd Aug 2022, 8:44 AM
Elijah Adebanwo
Elijah Adebanwo - avatar
2 odpowiedzi
+ 15
If we have this type of tree: <div id="p1" style="position: relative;"> <div id="p2" style="position: relative;"> <div id="c1" style="position: absolute;"> </div> </div> </div> then the "c1" element will be positioned relatively to the "p1" element, because it is the first parent with relative position.
22nd Aug 2022, 9:17 AM
Igor Makarsky
Igor Makarsky - avatar
+ 1
Thanks
22nd Aug 2022, 9:19 AM
Elijah Adebanwo
Elijah Adebanwo - avatar