Avery-Stock Posted July 11, 2021 Share Posted July 11, 2021 Site URL: https://www.averyyoungphotography.com I would like to add captions to my images that only appear when you hover. Located on my homepage gallery (work), using a masonry grid - Just like https://www.oliviabossert.com Thanks! Link to comment
tuanphan Posted July 11, 2021 Share Posted July 11, 2021 6 hours ago, Avery-Stock said: Site URL: https://www.averyyoungphotography.com I would like to add captions to my images that only appear when you hover. Located on my homepage gallery (work), using a masonry grid - Just like https://www.oliviabossert.com Thanks! Hi. Can you add some demo captions? We can check & give the code to make hover effect easier Avery-Stock 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Avery-Stock Posted July 11, 2021 Author Share Posted July 11, 2021 Just added some onto my site. Thank you Link to comment
tuanphan Posted July 13, 2021 Share Posted July 13, 2021 On 7/12/2021 at 2:34 AM, Avery-Stock said: Just added some onto my site. Thank you Add to Design > Custom CSS 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; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,0.5); /* 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Avery-Stock Posted July 13, 2021 Author Share Posted July 13, 2021 Thank you so much! If I wanted to move it the bottom of the picture and have a grey background, similar to https://www.oliviabossert.com how would I do that? Link to comment
tuanphan Posted July 14, 2021 Share Posted July 14, 2021 11 hours ago, Avery-Stock said: Thank you so much! If I wanted to move it the bottom of the picture and have a grey background, similar to https://www.oliviabossert.com how would I do that? use this new code figure.gallery-masonry-item { position: relative; } .gallery-caption { position: static; } /* title */ .gallery-caption-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; z-index: 999; transition: opacity ease 200ms !important; opacity: 0 !important; pointer-events: none; height: 10% !important; } .gallery-masonry-item:hover .gallery-caption-content { opacity: 1 !important; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } GPUNK 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
L_Gal Posted April 27, 2022 Share Posted April 27, 2022 Hi @tuanphan could you please help me to do a mixture of the two things you did above. I've used the top code so that my text hovers over the image in my masonry gallery. I'd like it to have a grey overlay when I hover over it as well. Do I change the font size to be larger in my style settings or is that code? website: https://www.yespeach.com.au/work Thank you very much! Link to comment
tuanphan Posted April 30, 2022 Share Posted April 30, 2022 On 4/27/2022 at 6:54 PM, L_Gal said: Hi @tuanphan could you please help me to do a mixture of the two things you did above. I've used the top code so that my text hovers over the image in my masonry gallery. I'd like it to have a grey overlay when I hover over it as well. Do I change the font size to be larger in my style settings or is that code? website: https://www.yespeach.com.au/work Thank you very much! The url doesn't work. Can you check it again? With above code, to change overlay color, change line 2 in this code /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity ease 200ms !important; } To change caption text size, you can add this code under .gallery-caption-content * { font-size: 10px !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
marieschultz Posted August 5, 2022 Share Posted August 5, 2022 On 4/30/2022 at 6:23 PM, tuanphan said: The url doesn't work. Can you check it again? With above code, to change overlay color, change line 2 in this code /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ left: 0; right: 0; bottom: 0; opacity: 0; transition: opacity ease 200ms !important; } To change caption text size, you can add this code under .gallery-caption-content * { font-size: 10px !important; } Hi @tuanphan! On mobile captions aren't visible with this – is there a way to turn them on either as an overlay or underneath the image for mobile devices? Thank you! Link to comment
tuanphan Posted August 7, 2022 Share Posted August 7, 2022 On 8/5/2022 at 11:46 AM, marieschultz said: Hi @tuanphan! On mobile captions aren't visible with this – is there a way to turn them on either as an overlay or underneath the image for mobile devices? Thank you! You mean make overlay + title always visible on mobile? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
sequoyahimages Posted May 13 Share Posted May 13 On 7/13/2021 at 8:17 AM, tuanphan said: Add to Design > Custom CSS 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; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,0.5); /* 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } Hey! I've added this code to my site, which works great. I was wondering if you could help with something. When I add a long caption to an image (enough words that the caption becomes two lines of text), the caption becomes left justified. Is there a way to have it always be center oriented, even with two lines of text? Link to comment
tuanphan Posted May 18 Share Posted May 18 On 5/14/2023 at 6:47 AM, sequoyahimages said: Hey! I've added this code to my site, which works great. I was wondering if you could help with something. When I add a long caption to an image (enough words that the caption becomes two lines of text), the caption becomes left justified. Is there a way to have it always be center oriented, even with two lines of text? Can you share link to page where you have problem? We can check code easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
GPUNK Posted September 21 Share Posted September 21 On 7/14/2021 at 9:45 AM, tuanphan said: use this new code figure.gallery-masonry-item { position: relative; } .gallery-caption { position: static; } /* title */ .gallery-caption-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; z-index: 999; transition: opacity ease 200ms !important; opacity: 0 !important; pointer-events: none; height: 10% !important; } .gallery-masonry-item:hover .gallery-caption-content { opacity: 1 !important; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } Hey Guys, two questions: just added this code to my website and it works awesome... (thank you for that) Question 1: Is there a way to just let it work on the home page so that the gallerys on the other pages are not affected by it ??? Question 2: Can i make the Type n the overlay bold? Much appreciated, cheers G Website: https://heron-radish-mbhe.squarespace.com/ Password: Kunst Link to comment
tuanphan Posted September 23 Share Posted September 23 On 9/21/2023 at 2:09 PM, GPUNK said: Hey Guys, two questions: just added this code to my website and it works awesome... (thank you for that) Question 1: Is there a way to just let it work on the home page so that the gallerys on the other pages are not affected by it ??? Question 2: Can i make the Type n the overlay bold? Much appreciated, cheers G Website: https://heron-radish-mbhe.squarespace.com/ Password: Kunst #1. Change code to this body.homepage { figure.gallery-masonry-item { position: relative; } .gallery-caption { position: static; } /* title */ .gallery-caption-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; z-index: 999; transition: opacity ease 200ms !important; opacity: 0 !important; pointer-events: none; height: 10% !important; } .gallery-masonry-item:hover .gallery-caption-content { opacity: 1 !important; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } } #2. Whole text bold or which text? GPUNK 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
jodiep67 Posted September 26 Share Posted September 26 Reading through this string and using the code but it's not working at all on my site (not live yet) Well, sometimes it works in the "edit" mode, but not to all of the images I have captions with. ??? Link to comment
tuanphan Posted October 1 Share Posted October 1 On 9/26/2023 at 11:15 PM, jodiep67 said: Reading through this string and using the code but it's not working at all on my site (not live yet) Well, sometimes it works in the "edit" mode, but not to all of the images I have captions with. ??? Can you share link to page where you use gallery? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
GPUNK Posted October 6 Share Posted October 6 got it, thank you so much!!!!! On 9/23/2023 at 10:52 AM, tuanphan said: #1. Change code to this body.homepage { figure.gallery-masonry-item { position: relative; } .gallery-caption { position: static; } /* title */ .gallery-caption-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center; z-index: 999; transition: opacity ease 200ms !important; opacity: 0 !important; pointer-events: none; height: 10% !important; } .gallery-masonry-item:hover .gallery-caption-content { opacity: 1 !important; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,1); /* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } } #2. Whole text bold or which text? tuanphan 1 Link to comment
Civic Posted November 17 Share Posted November 17 (edited) Thanks for this @tuanphan I would love for the captions to be clickable to the image link as well Edited November 17 by Civic Link to comment
tuanphan Posted November 20 Share Posted November 20 On 11/18/2023 at 5:31 AM, Civic said: Thanks for this @tuanphan I would love for the captions to be clickable to the image link as well Can you share link to page where you use gallery? Civic 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Civic Posted November 20 Share Posted November 20 (edited) Hello @tuanphan I just solved. Here my custom code: /////Grid Porfolio///// .gallery-caption-grid-masonry { opacity: 0; z-index: -1; transition: all .2s; position: absolute; top: 50%; transform: translateY(-50%); left: 0; text-align: center; height: 100%; padding: 0; transition: all 0.3s ease-in-out !important; } .gallery-masonry-item:not(.has-clickthrough) .gallery-caption-grid-masonry:before { background-color: rgba(0, 0, 0, 0.4); content: ""; display: block; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 999; opacity: 0; transition: all 0.3s ease-in-out !important; } .gallery-masonry-item.has-clickthrough:hover .gallery-caption-grid-masonry { z-index: 0; opacity: 1; height: auto; transition: all 0.3s ease-in-out !important; } .gallery-masonry-item:not(.has-clickthrough):hover .gallery-caption-grid-masonry { z-index: 0; opacity: 1; transition: all 0.3s ease-in-out !important; } .gallery-masonry-item:hover .gallery-caption-grid-masonry:before { opacity: 1; transition: all 0.3s ease-in-out !important; } .gallery-caption-grid-masonry .gallery-caption-wrapper { display: flex; align-items: center; justify-content: center; transition: all 0.3s ease-in-out !important; } .gallery-caption-grid-masonry p.gallery-caption-content { z-index: 1000; font-size: 1.5rem; font-family:'ProximaNova-Light.otf'; color:#000; transition: all 0.3s ease-in-out !important; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(255,255,255,1); transition: all 0.3s ease-in-out !important;/* overlay color */ content: ""; display: block; position: absolute; height: 10%; /* overlay height */ left: 0; right: 0; bottom: 0; opacity: 0; transition: all 0.3s ease-in-out !important; height:100%; } .gallery-masonry-item-wrapper{ border-radius:5px; } .gallery-masonry-item-wrapper a{ transform:scale(1); transition: all 1s ease-in-out; &:hover{ transform:scale(1.03); transition: all 1s ease-in-out; } } .gallery-masonry-item:hover .gallery-masonry-item-wrapper a:after { opacity: 0.75; transition: all 0.3s ease-in-out !important; } .gallery-caption-grid-masonry .gallery-caption-content{ transition: all 1s ease-in-out !important; } /////Grid Porfolio///// https://faas-dev.squarespace.com/sample pass:helloworld Edited November 20 by Civic link tuanphan 1 Link to comment
hsmq Posted Saturday at 01:10 AM Share Posted Saturday at 01:10 AM Hello, I used the first code in this thread and it worked great, thank you! How can I have the caption text in 3 lines instead of one on the hover? This is what I want: Rocking Duet Steel, Glass 4 x 2 x 1.5 ft This is what I currently have: Rocking Duet Steel, Glass 4 x 2 x 1.5 ft This is the current code I am using: 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; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,0.5); /* 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } Thank you so much! Link to comment
tuanphan Posted Sunday at 07:04 AM Share Posted Sunday at 07:04 AM On 11/25/2023 at 8:10 AM, hsmq said: Hello, I used the first code in this thread and it worked great, thank you! How can I have the caption text in 3 lines instead of one on the hover? This is what I want: Rocking Duet Steel, Glass 4 x 2 x 1.5 ft This is what I currently have: Rocking Duet Steel, Glass 4 x 2 x 1.5 ft This is the current code I am using: 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; } /* overlay */ .gallery-masonry-item-wrapper a:after { background: rgba(0,0,0,0.5); /* 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; } .gallery-masonry-item * { color: white; } /* remove gap */ figcaption { padding: 0 !important; } Thank you so much! You will need to adjust code a bit, but first to add line break to 3 lines, you edit the text from this Rocking Duet Steel, Glass 4 x 2 x 1.5 ft to this Rocking Duet<br/> Steel, Glass <br/>4 x 2 x 1.5 ft this will break to 3 lines, however maybe they will overlap together, if this problem appears, let me know your site url, we will give code to add space Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
hsmq Posted Sunday at 07:03 PM Share Posted Sunday at 07:03 PM Thank you! That solved! Is there a way to now center justify the hover caption? Link to comment
tuanphan Posted yesterday at 03:05 AM Share Posted yesterday at 03:05 AM On 11/27/2023 at 2:03 AM, hsmq said: Thank you! That solved! Is there a way to now center justify the hover caption? Can you share link to page where you use gallery? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
hsmq Posted yesterday at 03:17 AM Share Posted yesterday at 03:17 AM Yes, it is on the homepage here https://www.johnmathewsculpture.com 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