Ronalds Vilciņš

04Mab%!0rD

CSS margin-inline property

The margin-inline CSS property is your key to controlling the space around elements on the horizontal axis (left and right). Think of it like carefully arranging furniture in a room for that perfect mix of comfort and style.

What does it do?

The margin-inline property sets the amount of space on the left and right sides of these website elements:

Why does it matter?

margin-inline brings these benefits to your website:

How to use it

You can set margin-inline with various values:

Example:

img { /* Targets all image elements */
  margin-inline: 15px;  /* Adds 15 pixels of space on both left and right */
}