Skip to content

Instantly share code, notes, and snippets.

@jamiemarsland
Created October 13, 2022 18:25
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 jamiemarsland/f27cb41835286e8045f3bfe4ac8947b7 to your computer and use it in GitHub Desktop.
Save jamiemarsland/f27cb41835286e8045f3bfe4ac8947b7 to your computer and use it in GitHub Desktop.
Add Background image to Gutenberg Columns Block
.shorts {
background-image: url('https://woo.us2.instawp.xyz/wp-content/uploads/2020/09/product-w-jeans1.jpg');
background-color: #cccccc; /* Used if the image is unavailable */
height: 500px; /* You must set a specified height */
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment