position: relative makes child elements with Absolute fit (top, left, bottom and right) to the parent element instead of adjusting the whole page. That is, if an element with position:Bsolute is inside an element with position:relative, the top:0 and left:0 position will be based on the parent element, if this parent element is in the middle of the page then the position will be from this location, instead of the end of the page. In short, relative is not the same thing as Absolute and we usually use both together.
Yesterday you asked the same question...
– MarceloBoni
position: relative
makes child elements with Absolute fit (top, left, bottom and right) to the parent element instead of adjusting the whole page. That is, if an element with position:Bsolute is inside an element with position:relative, the top:0 and left:0 position will be based on the parent element, if this parent element is in the middle of the page then the position will be from this location, instead of the end of the page. In short, relative is not the same thing as Absolute and we usually use both together.– Guilherme Nascimento