Last active
December 19, 2018 05:29
-
-
Save johnregan3/50d95cf4cc4376b0b733efb8043af1de to your computer and use it in GitHub Desktop.
Add Full Width Image Support in a WordPress Theme - CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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