HTML CSS SQL Meta tag Generator ScrollBar design Generator Encode Decode images

CSS Basics

Introduction Syntax Selectors Attribute Selectors Specificity Combinators !important Comments Colors

CSS Need to Know

Box Model Pseudo-class Pseudo-element Inline-block Math Functions Max and Min Opacity Outline Overflow Z-index Float

Most used

Align Backgrounds Borders Text Units Padding Margins Position Tables Display Fonts Lists Height and Width

CSS Reference

CSS Properties reference CSS Pseudo-Classes reference CSS Pseudo-Elements reference CSS Selector reference

CSS margin-inline-end

The margin-inline-end property in CSS is used to set the margin on the end side of an element. The end side is affected by the direction of the text, so in left-to-right languages like English, the end side is on the right, and in right-to-left languages like Arabic, the end side is on the left.

The syntax for the margin-inline-end property is:

selector {
  margin-inline-end: value;
}

Here is an example where we set the margin-inline-end for a paragraph:

Result:

This is a paragraph with margin on the end side.

In this example, we set the margin-inline-end to 20 pixels for the paragraph, which creates space on the end side of the paragraph's text.

You can also use different units like percentages or ems for the margin-inline-end property. Here is an example using percentages:

Result:

Another paragraph with margin on the end side.

In this example, we set the margin-inline-end to 10% for the paragraph, which creates space on the end side relative to the width of the containing element.

It's important to note that the margin-inline-end property only affects block-level elements. Inline elements will ignore this property.