Be the first user to complete this post
|Add to List|
OverviewTo design and understand the page layouts, we need to understand the position property in css. An element is said to be positioned, when its position attribute is set.
The default value for the position attribute is static.
position : relative || absolute || fixed || sticky (experimental);
This post is one of the posts in the series of posts to understand the position attribute in css. Make sure to read all of them to fully understand the position attribute.
- position : static || relative - element is in the normal document flow.
- position : absolute || fixed - element is absolutely positioned.
- float : left || right - element is floating. Learn More about floats.
- Allows you to position an element on the document.
- Keeps the element fixed at its position irrespective of DOM status.
Check out James Williamson's excellent tutorial on Fixed Positioning !
- css: margin does not work
- Two column layout in css
- pseudo elements vs pseudo classes
- Getting started with es6 iterators and iterables
- Difference between async and defer attributes in script tags
- window.onload vs document.onload
- Applying floats to inline elements