diff --git a/README.md b/README.md index d7e3c444..a4c22a3c 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ A collection of tips to help take your CSS skills pro. 1. [Use `:root` for Flexible Type](#use-root-for-flexible-type) 1. [Set `font-size` on Form Elements for a Better Mobile Experience](#set-font-size-on-form-elements-for-a-better-mobile-experience) 1. [Use Pointer Events to Control Mouse Events](#use-pointer-events-to-control-mouse-events) - +1. [Aligns the flexible container's items](#aligns-the-flexible-containers-items) ### Use a CSS Reset @@ -556,6 +556,21 @@ It's that simple. [back to table of contents](#table-of-contents) +### Aligns the flexible container's items +The [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) property defines how the browser distributes space between and around content items along the main axis of their container. + +```css +div { + display: flex; + justify-content: center; +} + +``` +So, this can be very useful in aligning the flex items in center. + +[back to table of contents](#table-of-contents) + + ## Support Current versions of Chrome, Firefox, Safari, Opera, Edge, and IE11.