+ 1

What's Deference Between Positions in CSS ?

we have 4 types of position properties : static relative fixed absolute => of course positions is important for any webpage. so What's the Deference between 4 element positions above ? thanks ..

12th Sep 2017, 5:45 PM
Ahmed Soliman
Ahmed Soliman - avatar
2 Réponses
+ 12
Static : Default value. Elements render in order, as they appear in the document flow. Absolute : The element is positioned relative to its first positioned (not static) ancestor element. Fixed : The element is positioned relative to the browser window. Relative : The element is positioned relative to its normal position, so "left:20px" adds 20 pixels to the element's LEFT position. Initial : Sets this property to its default value. Inherit : Inherits this property from its parent element.
12th Sep 2017, 6:29 PM
Ranjan Bagri
Ranjan Bagri - avatar