Created
March 12, 2018 16:38
-
-
Save mitramejia/a1a6546b84cadf68e5944b0879407930 to your computer and use it in GitHub Desktop.
Some times we need to add a full width containers (which spans 100% of window) inside a container which has a fixed width and aligned center
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
<div class="container" style="width: 750px; margin: 0 auto;"> | |
<div class="row-full"> | |
--- Full width container --- | |
</div> | |
</div> | |
.row-full{ | |
width: 100vw; | |
position: relative; | |
margin-left: -50vw; | |
height: 100px; | |
margin-top: 100px; | |
left: 50%; | |
} | |
// original: https://coderwall.com/p/hkgamw/creating-full-width-100-container-inside-fixed-width-container |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment