CSS inset-inline-start

The inset-inline-start property in CSS sets the inset distance of an element on the inline-start side (left for LTR languages, right for RTL languages) of its containing block.

This property is especially useful for creating responsive layouts or adjusting the positioning of elements on a webpage.

Let's see how the inset-inline-start property works with some examples:

Result:

    .box {
      width: 200px;
      height: 100px;
      background-color: lightblue;
      inset-inline-start: 20px;
    }
  

In this example, we have a div with a class of 'box'. The inset-inline-start property is set to 20px, which creates a distance of 20px from the left (inline-start) side of its containing block.

Let's take a look at another example:

Result:

    .item {
      width: 100px;
      height: 100px;
      background-color: lightgreen;
      inset-inline-start: 50%;
    }
  

In this example, the inset-inline-start property is set to 50%, which positions the element at the center of its containing block along the inline-start side.

Feel free to experiment with different values for the inset-inline-start property to see how it affects the positioning of elements on a webpage.