Syntax as for absolute positioning just change:
style="position:relative; ..."
The differences between them are:
- absolute positioning takes its X and Y coordinates from the top left corner of the page (0, 0);
- relative positioning takes its X and Y coordinates not from top left corner of the page, but RELATIVE on some other object.
For example you have FORM object before your layer and its (layer's) X and Y are 25, 25 -
- using absolute positioning your layer will be 25 pixels right from the left border and 25 pixels down from the top of your page. No matter is where FORM object starts and ends;
- using relative positioning it will be 25 pixels right from the left and 25 pixels down from the bottom of FORM object. So its X and Y starts not from page's top and left, but from the lower pixel of FORM object (dependes on X and Y of the prevoius object, in our case FORM object).
You can experiment with enclosed layers, one with absolute positioning and second (which is enclosed) with relative. (It looks a little bit different in IE and NN)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.