To manipulate the exact position of your HTML elements,CSS Positioning is used.
Now all the designs to be done entirely in CSS that previously required the use of javascript or HTML image maps . Not only is it easier to code, but it also loads much quicker!
Position Relative
The position of the HTML element changes relative to where it normally appears using relative positioning .
We could use relative positioning to move it a bit to the right and down a couple of pixels,if we had a header that appears at the top of our page, .
Using only two
(left and top),you probably noticed that you define the four
possible directions (left, right, up, and down) . Here's a quick reference when moving HTML
elements in CSS.
Move Left - Use a negative value for left.
Move Right - Use a positive value for left.
Move Up - Use a negative value for top.
Move Down - Use a positive value for top.
Position Absolute
You define the exact pixel value where the specified HTML element will appear using absolute positioning.
So be sure you are measuring from the top-left of the browser's viewable area.
Note:Firefox does not currently interpret absolute positioning correctly. However both IE 6.0+ and Opera 8.0+ do.