Created
March 1, 2013 16:13
-
-
Save erbmicha/5065682 to your computer and use it in GitHub Desktop.
CSS technique for utilizing calc to center content inside a container instead of using 'margin:0 auto' on all elements inside the container.
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
.section { | |
width: 700px; | |
padding: 1em calc(50% - 350px); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment