There are two types of positioning: absolute and relative. Absolute positioning will place an element absolutely on your page. You can specify the exact pixel location. If you want to place an image to appear 50 pixels from then top of the page and 50 pixels from the right, you can do this:
img { position: absolute; top 50px; right 50px; }
While relative means you are positioning it from the normal position. You can use it to draw x2. The letter x in this case is the normal position and you are positioning the power 2 relative to the letter x. The code is:
position: relative; bottom:4px; left: 1px;
You should remember that if you want to move something right, you use the right code, and vice versa.
Related posts:












2 comment(s)
Track this comments via RSS 2.0 feed. Feel free to post the comment, or trackback from your web site.
There is also Fixed Positioning which is defined in W3Schools as
The element with fixed position is positioned relative to the browser window.
It will not move even if the window is scrolled
Well, What do you mean by “normal position”? Is it the way how the page and your contents move when the user resize or move the browser window itself? If it goes with the browser or if it adjust itself so that it will perfectly fit on the browser window, that is quite good and that should be the format you should be using.
Any feedback from you?