Skip to content

Instantly share code, notes, and snippets.

@kovtunos
Last active February 28, 2018 19:04
Show Gist options
  • Select an option

  • Save kovtunos/140931e6c0157ba46bf3aa96391fa74f to your computer and use it in GitHub Desktop.

Select an option

Save kovtunos/140931e6c0157ba46bf3aa96391fa74f to your computer and use it in GitHub Desktop.
Full width section inside fixed width container #css
/* Variant 1 */
.full-width {
margin-left: calc(-50vw + 50%);
margin-right: calc(-50vw + 50%);
}
/* Variant 2 */
.full-width {
width: 100vw;
margin-left: -50vw;
position: relative;
left: 50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment