Last active
August 26, 2019 15:06
-
-
Save jayhill90/3939062df77f5bb28aa6af7f277db5bb to your computer and use it in GitHub Desktop.
Center divs with auto margins for container div.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
margin-left: auto; | |
margin-right: auto; | |
position: relative; | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: center; | |
} | |
.item { | |
display: inline-block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment