Tagged: masonry, masonry grid, overlay
Is there a way to add a slight opacity color overlay to the preview image on the masonry grid? This way it is easier to read the text on top of it.
Please see the masonry grid at the bottom of the page specified.
Hey nV15OoBtg21iTn5z,
Thank you for the inquiry.
You can use this css code to add an overlay above the masonry images to make the caption more readable.
#top .av-caption-style-overlay.av-hover-overlay- .av-masonry-item-with-image .av-inner-masonry-content {
background: rgba(0,0,0,0.5);
}
You may need to toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the css.
Best regards,
Ismael
Thank you, Ismael!
If anyone else needs it, I’ve combined your code with that from another thread — so by default, there is a slight opacity on the image with white text on the overlay… and then on hover, that turns black with white text.
/* Masonry grid overlay. */
#top .av-caption-style-overlay.av-hover-overlay- .av-masonry-item-with-image .av-inner-masonry-content {background: rgba(0,0,0,0.5);}
#top .av-inner-masonry-content-pos-content .av-masonry-entry-title {color: white;}
#top .av-caption-style-overlay .av-masonry-item-with-image .av-inner-masonry-content:hover {background: rgba(0,0,0,1);}