Skip to content

Instantly share code, notes, and snippets.

@renecnielsen
Created July 11, 2019 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renecnielsen/96d309ef24f0db3d8d96c1bbdbe4bec5 to your computer and use it in GitHub Desktop.
Save renecnielsen/96d309ef24f0db3d8d96c1bbdbe4bec5 to your computer and use it in GitHub Desktop.
CSS to enable .alignwide and .alignfull Gutenberg Blocks when I use Elementor page builder to create single posts templates
/* All I've done is a few edits to the brilliant walk-through on https://joshcollinsworth.com/adding-gutenberg-full-and-wide-width-image-support-to-your-wordpress-theme/ */
.alignfull {
max-width: 100vw !important;
margin: 2rem calc(50% - 50vw) !important;
}
.alignwide {
max-width: 100vw !important;
margin: 2rem calc(50% - 50vw) !important;
}
@media (min-width: 740px) {
.alignwide {
max-width: calc(100% + 20vw) !important;
margin: 2rem -10vw !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment