CSS offset

The CSS offset property is used to specify the positioning of an element relative to its normal position within the document flow. It allows you to move an element in any direction without affecting the layout of other elements on the page.

To apply an offset to an element, you can use the offset-top, offset-right, offset-bottom, and offset-left properties in CSS. These properties define the distance that the element should be moved from its normal position in the specified direction.

Here is an example of how to use the CSS offset property:

Result:

    .offset-example {
      position: relative;
      offset-top: 20px;
      offset-left: 50px;
    }
  
This is an example text with offset applied.

In the example above, we have defined a class called offset-example with an offset of 20 pixels from the top and 50 pixels from the left. This moves the element 20 pixels down and 50 pixels to the right from its normal position within the document flow.