Created
August 9, 2017 14:06
-
-
Save octavian-nita/efbb486c5f5ff250131cda1c985e19d7 to your computer and use it in GitHub Desktop.
The Best Way to Implement a “Wrapper” in CSS (?) (@see https://css-tricks.com/best-way-implement-wrapper-css/)
This file contains hidden or 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
/** | |
* See https://css-tricks.com/best-way-implement-wrapper-css/ | |
* | |
* 1. Centers the content. Yes, it's a bit opinionated. | |
* 2. See the "width vs max-width" section | |
* 3. See the "Additional Padding" section | |
*/ | |
.wrapper { | |
margin-right: auto; /* 1 */ | |
margin-left: auto; /* 1 */ | |
max-width: 960px; /* 2 */ | |
padding-right: 10px; /* 3 */ | |
padding-left: 10px; /* 3 */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment