Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The method of using relative position in CSS involves specifying the positioning of an element relative to its original position in the document flow. This is achieved by setting the CSS property 'position' to 'relative' for the desired element. Once this property is set, the element can be moved up, down, left or right using the 'top', 'bottom', 'left' or 'right' properties respectively. The element's new position is calculated relative to its original position, meaning that if it was later in the flow of the document, it will still be considered as such. This method is useful for fine-tuning the position of individual elements within a layout.