Skip to content

Commit

Permalink
Update files/en-us/web/css/margin/index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
estelle authored Jun 20, 2024
1 parent ae1ce1a commit 94d5aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/css/margin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The top and bottom margins have no effect on _non-[replaced](/en-US/docs/Web/CSS

You can horizontally center an element within its parent by setting `margin: 0 auto;`.

More commonly, though, people horizontally center element by setting {{cssxref("display")}}`: flex;` {{cssxref("justify-content")}}`: center;` on a container, which [centers its flex item](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container) children.
A more common method to center an element horizontally is by setting `display: flex;` and [`justify-content: center;`](/en-US/docs/Web/CSS/justify-content) on a container, which [centers its flex item](/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container) children.

### Margin collapsing

Expand Down

0 comments on commit 94d5aaf

Please sign in to comment.