Created
May 19, 2020 15:16
-
-
Save adityabhaskar/6d37d7eae3b2f5f4b6cc7c64855d5583 to your computer and use it in GitHub Desktop.
Basic centred webpage css
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
body { | |
/* content width is 2x 350px */ | |
margin: auto calc(50% - 350px); | |
color: rgba(0, 0, 0, .8); | |
font-size: 16px; | |
font-family: system-ui, 'Roboto', sans-serif; | |
line-height: 1.6; | |
} | |
@media (max-width: 767px) { | |
body { | |
margin: auto 2rem; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment