Skip to content

Flex align #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -556,6 +556,21 @@ It's that simple.
<sup>[back to table of contents](#table-of-contents)</sup>


### 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.

<sup>[back to table of contents](#table-of-contents)</sup>


## Support

Current versions of Chrome, Firefox, Safari, Opera, Edge, and IE11.
Expand Down