Skip to content
This repository was archived by the owner on Feb 27, 2026. It is now read-only.

Commit 942a2ce

Browse files
Enhance margin-inline.md with example images
Added visual examples for margin-inline CSS property.
1 parent 3d2bcff commit 942a2ce

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

content/css/concepts/margins/terms/margin-inline/margin-inline.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ h1 {
5151
}
5252
```
5353

54+
The output will be as follows:
55+
56+
![An h1 heading centered on the page with equal horizontal spacing of 20 pixels on both the left and right sides.](https://raw.githubusercontent.com/Codecademy/docs/main/media/margin-inline-example-1.png)
57+
5458
## Example 2
5559

5660
This example sets the inline-start margin of the `h1` element to be `10px` and inline-end margin to be `30px`:
@@ -61,6 +65,10 @@ h1 {
6165
}
6266
```
6367

68+
The output will be as follows:
69+
70+
![An h1 heading with uneven horizontal spacing, showing a smaller left margin of 10 pixels and a larger right margin of 30 pixels.](https://raw.githubusercontent.com/Codecademy/docs/main/media/margin-inline-example-2.png)
71+
6472
## Example 3
6573

6674
The following example sets the inline margins of the `h1` element to be `5%`:
@@ -70,3 +78,7 @@ h1 {
7078
margin-inline: 5%;
7179
}
7280
```
81+
82+
The output will be as follows:
83+
84+
![An h1 heading with proportional horizontal spacing, displaying equal left and right margins set to 5 percent of the containing element’s width.](https://raw.githubusercontent.com/Codecademy/docs/main/media/margin-inline-example-3.png)

0 commit comments

Comments
 (0)