skali Posted January 28 Posted January 28 Hello! I'm using a masonry style gallery sectionon this page (https://www.michaeldruker.com/properties). I've included the CSC code below that is implemented to style the captions & color change on hover. In addition to this we'd like to link out each image, but the links aren't activating. I'm thinking this code might be stacked on top of the click event or is disabling it for some reason. Or maybe it has to do with the initial opacity? Does anyone have thoughts on how I can bring the links forward so that they are clickable? The first image has a link applied for testing purposes (screenshot attached) Thank you in advance!! // *Caption Styling - Title* // @media @desktop { section[data-section-id="63eb213085c26b62e058f848"] .gallery-masonry-item .gallery-caption .gallery-caption-wrapper p.gallery-caption-content { margin: 0; color: white; font-family: 'Goudy+Modern+MT+Std+Regular'; font-style: normal; letter-spacing: 0em; line-height: 1.1em; font-size: 2rem; text-align: center; }} // *Caption Styling - Second Line (Location)* // @media @desktop { section[data-section-id="63eb213085c26b62e058f848"] .gallery-masonry-item .gallery-caption .gallery-caption-wrapper p.gallery-caption-content strong { color: white; font-size: 1rem; font-family: 'Karla'; letter-spacing: .05em; font-weight: 400; display: block; text-transform: uppercase; line-height: 20px; margin-top: 8px; line-height: 0em !important; margin-bottom: 30px !important; }} //* PROPERTIES GALLERY GREYSCALE EFFECT * // @media @desktop { section[data-section-id="63eb213085c26b62e058f848"] { .gallery-masonry-item img { filter: grayscale(100%); transition: filter .2s ease-in-out; } .gallery-masonry-item:hover img { filter: none; transition: filter .2s ease-in-out; }}} //* PROPERTIES GALLERY CAPTIONS (DESKTOP) * // .gallery-caption { position: absolute; top: 0; left: 0; background: rgba(0,0,0,0.25); /* overlay color */ height: 100%; max-width: unset; padding: 0; opacity: 0; } .gallery-caption-wrapper { display: flex; align-items: center; /* center vertically */ justify-content: center; /* center horizontally */ } .gallery-masonry-item { position: relative; } .gallery-masonry-item:hover .gallery-caption { opacity: 1; } .gallery-caption-grid-masonry { transition-delay: 3ms; }
Solution tuanphan Posted January 30 Solution Posted January 30 Change this code to this code //* PROPERTIES GALLERY CAPTIONS (DESKTOP) * // .gallery-caption { position: absolute; top: 0; left: 0; background: rgba(0,0,0,0.25); /* overlay color */ height: 100%; max-width: unset; padding: 0; opacity: 0; pointer-events: none; } skali 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment