There are two very big differences between Static
and Relative
positioning. Most of which is most identifiable by the name of the components. As you would imagine, a Static
positioned component will be static! You will be unable to control the position of the component that is making use of Static
, with top
, left
, bottom
and right, rather it is positioned by being placed under the last component.
Relative, on the other hand, is a much better solution and much it is much more useful. You can, unlike Static
positioning, position is using top
, left
, right
and bottom
, but it is still placed underneath the last component.
In addition, you are unable to control the Z-Index
of a Static
ly positioned component. However, this is not the case with a Relative
ly positioned component. Using Z-Index
on a Static
ly positioned component will have no affect at all, and will just place the component beneath the components that are called before it.
Static
positioning is a lot like Relative
positioning, without all of the control. If you just want to place several components, one after each other, without worries of how they will be positioned. Like so: http://jsfiddle.net/u62GV/ Then use Static
. But if you would like to have several components placed one after each other, with the capability of positioning the components (similar to absolute)I would recommend Relative
, as can be seen in the following example: http://jsfiddle.net/AhLF5/.
Maybe these links can help you:
Difference between static and relative positioning
http://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/
http://www.codecademy.com/forum_questions/513b0a64ee849413590009f9