CSS Positioning
CSS positioning is used to position an element on the web page. It has a different positioning method that is used by elements during positioning on the web page.These positioning methods are static
, relative
, fixed
, absolute
or sticky
.
CSS Positioning Property
Followings are the positioning properties: static
, relative
, fixed
, absolute
, sticky
CSS Static Positioning
This is the default positioning of the HTML element and it is not affected by the top, bottom, left, right, and z-index properties. It is always positioned as per the normal flow of text.
.box{
padding: 20px;
background: #7dc765;
}
The CSS position property is used to place the element left,right,top,bottom from its normal position.