There are many tutorials on CSS positioning. In short, there are three modes:
- static
- relative
- absolute
In static mode, the element is located where it should normally be.
In relative mode is the position set by the parent element.
And how is it in absolute positioning? In absolute mode, positioning is from the nearest parent tag that has set the relative positioning or absolute.
Interesting tutorial: http://www.barelyfitz.com/screencast/html-training/css/positioning/