Skip to content

Instantly share code, notes, and snippets.

@liddiard
Last active August 25, 2015 21:43
Show Gist options
  • Save liddiard/4e8e80bcb6e5ca7ed2e2 to your computer and use it in GitHub Desktop.
Save liddiard/4e8e80bcb6e5ca7ed2e2 to your computer and use it in GitHub Desktop.
100 percent screen width element inside a narrower, fixed width container/wrapper element. Useful for things like full-width photos and graphics inside an article text container with fixed width. Works in IE 9+.
.fullwidth {
width: 100vw;
margin-left: calc((100vw - $wrapper_width)/-2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment