bellamalia Posted April 30 Share Posted April 30 Hello, I am trying to tweak a code that I have that allows a text to appear when hovering on gallery images. the code I have works with lightbox mode on but whenever I add a link to where I want the user to be redirected to another page on the website the lightbox feature goes away. website: https://puma-seabass-xgn4.squarespace.com/ pass: alaina on the art > modeling page you can see what I am saying when hovering over the first few images that show up. here is the code: .gallery-grid-item { position: relative; } .gallery-grid-item:hover .gallery-grid-lightbox-link { background: #000; /* Keeping your original background setting */ } .gallery-grid-item:hover .gallery-grid-lightbox-link img { opacity: 0.6; } .gallery-caption.gallery-caption-grid-simple { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.5s ease; /* Smooth transition for opacity */ } .gallery-grid-item:hover .gallery-caption-grid-simple { opacity: 1; /* Ensuring correct opacity on hover */ } .gallery-caption-content { text-align: center; color: #fff; font-weight: bold; /* Making the font bold */ font-size: 16px; /* Approximate size for an h4 header, adjust as needed */ } p.gallery-caption-content { font-family: LTC-Bodoni-175 !important; font-size: 150% !important; font-weight: bold !important; } Link to comment
tuanphan Posted May 2 Share Posted May 2 So when click an image, you want it will do 2 behaviors Open image lightbox Open new page ? 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!) Link to comment
bellamalia Posted May 5 Author Share Posted May 5 so i just want it to to hover over so it can be dark and you can read the font and yes open to a new page. Link to comment
tuanphan Posted May 7 Share Posted May 7 On 5/6/2024 at 2:25 AM, bellamalia said: so i just want it to to hover over so it can be dark and you can read the font and yes open to a new page. Currently I don't see gallery text. Can you enable it? Then I can check code easier. 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!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment