Last active
January 7, 2019 15:36
-
-
Save ThatGuySam/dba2c71172fe4894f1fc84c6f85c9525 to your computer and use it in GitHub Desktop.
Una Kravet's Formula for breaking out of a parent container to fill the page's full width https://twitter.com/Una/status/951519740840873984
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
// Una Kravet's Formula for breaking out of a parent container to fill the page's full width | |
/* | |
This can be used to make an element the full-width of the page is *most* cases | |
Original Idea: https://twitter.com/Una/status/951519740840873984 | |
*/ | |
.una-full-width { | |
width: 100vw; | |
position: relative; | |
left: 50%; | |
right: 50%; | |
margin-left: -50vw; | |
margin-right: -50vw; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment