Random Tech Thoughts

Setting The Background Color Of A Image Block In WordPress


Listen Later

Now that we're dealing with blocks if you want to put a background color on an image you have to go to your advanced, additional CSS classes section and reference a class that you have to create either in your theme files or in your special "additional CSS" area under the customizer.
I needed the background of an image to be black (and the caption text to be white) so I did:
.imgblack {
color: white;
background-color: black;
}

And then referenced that class name in the settings for that particular block.

Become a supporter of this podcast: https://www.spreaker.com/podcast/random-tech-thoughts--2829929/support.
...more
View all episodesView all episodes
Download on the App Store

Random Tech ThoughtsBy Kyle Souza

  • 5
  • 5
  • 5
  • 5
  • 5

5

3 ratings