CSS Fundamentals: Positioning
Published in
6 min readMay 15, 2020
In CSS, we set the location of an element by using the position
property.
For example:
.element {
position: relative;
top: 10px;
}
Our elements’ position will be moved down 10px from the top, relative to its original position in the document.
The position
property can have one of 5 values: