Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Full Width Image Support in a WordPress Theme - CSS
.alignwide {
/* Set these margins to work with your own theme. */
margin-left: -80px;
margin-right: -80px;
max-width: 100vw;
}
.alignfull {
margin-left: calc(-100vw / 2 + 100% / 2);
margin-right: calc(-100vw / 2 + 100% / 2);
max-width: 100vw;
}
.alignfull img {
width: 100vw;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment