Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
When an element has a position of relative, then its top, left, bottom, or right properties are adjusted, it fills the same space as it would have normally, but its actual appearance is offset, the place where it would have appeared being empty.
A more common use of position:relative is allowing absolutely positioned elements to be positioned relative to it. Also, in order to have a z-index, an element must some sort of positioning, either relative, absolute, or fixed. This is sometimes a reason to throw in a position:relative, even if no other properties are needed, since relative positioning doesn't remove an element from the "flow" of the document.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|