Skip to content

Instantly share code, notes, and snippets.

@freelancedaddytv
Created February 21, 2018 22:01
Show Gist options
  • Save freelancedaddytv/d9c703722451fb72fcd114418f03feed to your computer and use it in GitHub Desktop.
Save freelancedaddytv/d9c703722451fb72fcd114418f03feed to your computer and use it in GitHub Desktop.
Perfect Simple Full Width Background Inside Container
.yourelement {
background-image:url('yourimage.jpg'); // Use background-color for background color
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
width: 100vw;
position: relative;
margin-left: -50vw;
left: 50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment