Relative positioning will move the element 'relative' to where it started from - so:
Code:
#mydiv {
position: relative;
top: 100px;
left: 100px;
}
#mydiv will be moved 100px to the right and down from where it would normally be and will leave a space where it should have been.
Absolute positioning doesn't leave that space - the element is removed from the document flow, and repositioned relative to the position of its nearest ancestor that has a position set (or the body if no such ancestor exists).
In general (in terms of layout techniques) using just absolute positioning is not recommended; it doesn't cope well with text resizing, and means that you cannot use any other kind of positioning on elements after the absolutely positioned elements in the source code.
Bookmarks