Skip to content

Instantly share code, notes, and snippets.

@mitramejia
Created March 12, 2018 16:38
Show Gist options
  • Save mitramejia/a1a6546b84cadf68e5944b0879407930 to your computer and use it in GitHub Desktop.
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
<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