Position property is how element is positioned in webpage we have
static: by default all elements are static means they cant be moved like top ,bottom , right or left
Relative:element is positioned related to its normal position
Absolute: The elemenent is positioned absolutly according to its first parent and can be moved top right ,bottom or left
<div class="relative">
<p>paragraphy1</p>
<p class="absolute">paragraphy2</p>
</div>
Fixed: The element is position based on browser window means can not be moved
sticky : The element is postioned based on user scroll position it act like fixed until its acrross its parents
Top comments (0)