20
loading...
This website collects cookies to deliver better user experience
position
property, we can set the position of the document element.top
, left
, bottom
, right
) property with the position property. This four property will set the exact location of the element.{
position: static;
position: relative;
position: absolute;
position: fixed;
position: sticky;
}
top
, left
, bottom
, right
) property also has no effect with static position.100px
left, but it didn't move from its default position.top
, left
, bottom
, right
). The offset will change the position of the element from the default position of that elelement. top
, left
, bottom
, right
)..absolute
class and see the effect in action for the absolute position.top
, left
, bottom
, right
)..fixed
class and scroll down the page then we will see that the fixed box not going to scroll up it is sitting the exact position. That's for today. We will continue tomorrow. Happy Coding 🎉.