+ 2
MEANING OF Relative And Absolute
What does being absolute or relative mean?
4 Respostas
+ 2
relative is relative to the element's "normal flow" in the page. For example, if you have an element that is normally 5px from the top of the page, setting position to relative and top to 10px will move the element an additional 10px AWAY from the top of the page.
Absolute is relative to the closest parent element (defaulting to the <body> element). The best way to visualise this is if you put a <div> with absolute position and put it in another <div> the one inside will visually be inside the other div, potentially overlapping at points
+ 2
In what context?
+ 2
In positioning elements as well as in src's/href's of images,links,etc.
+ 2
And defining absolute position with images requires to state height and width both? I heard a rule something like this...