Hi!
Trying to use custom css to add a hover over effect on a masonary grid gallery.
Everything working ace EXCEPT, when the caption copy runs over to two lines, it changes from center to left align 😞
Here's the code - any ideas?
I can't add any code to head tag as the subscription level my friend has isn't high enough.
/* gallery Hover effect */
figure.gallery-masonry-item {
position: relative;
}
.gallery-caption {
position: static;
}
/* title */
.gallery-caption-content {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 999;
padding: 7%;
transition: opacity ease 200ms !important;
opacity: 0 !important;
pointer-events: none;
}
.gallery-masonry-item:hover .gallery-caption-content {
opacity: 1 !important;
font-size: 30px !important;
color: #FFFFFF;
}
/* overlay */
.gallery-masonry-item-wrapper a:after {
background: #000000; /* overlay color */
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
transition: opacity ease 200ms !important;
}
.gallery-masonry-item:hover .gallery-masonry-item-wrapper a:after {
opacity: 0.75;
}
/* remove gap */
figcaption {
padding: 0 !important;
}