Tonmeister Posted June 14, 2020 Share Posted June 14, 2020 Site URL: https://wisteria-panda-z2eg.squarespace.com/sound-talent pw for the site is: rotorsound Dear All, Is there any way, to apply line breaks in captions such as gallery grid captions? This has been talked about in the past, but I couldn't find solutions for 7.1. In the example website, I would like to apply line breaks wherever I currently have commas. I would even go so far as to labeling them all by hand through code, as suggested by this code, that I found here in the forum: /* image 1 */ .sqs-gallery-block-grid .slide:nth-child(1) .image-slide-title:after { content: "Dinosaur line 2"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } /* Image 2 */ .sqs-gallery-block-grid .slide:nth-child(2) .image-slide-title:after { content: "Banana 02"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } However, this seems to have been written for 7.0. I cannot get it to work in 7.1. Any pointers would be greatly appreciated! Best, Tonmeister Link to comment
tuanphan Posted June 14, 2020 Share Posted June 14, 2020 Try use this in caption Quote line 1 <br/> line 2 Tonmeister 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
Tonmeister Posted June 15, 2020 Author Share Posted June 15, 2020 omg, I am such a fool. Somehow read that html wasn't enabled. Thank you!!! that did it. Link to comment
LoneSpruce Posted August 30, 2021 Share Posted August 30, 2021 Is there any way to format Line 2 separately from Line 1? Make Line 1 a larger font size for example than Line 2? I've tried using <h2> on Line 2 with no success after using the line break <br/> Link to comment
oeditorial Posted October 14, 2021 Share Posted October 14, 2021 On 6/14/2020 at 2:04 PM, tuanphan said: Try use this in caption Hello @tuanphan Sorry for the stupid question, but how do I use the '<br/>' within the following css snippet to create two lines in a tittle of a Gallery Section of a SS 7.1 site?: /* image 1 */ .sqs-gallery-block-grid .slide:nth-child(1) .image-slide-title:after { content: "Dinosaur line 2"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } /* Image 2 */ .sqs-gallery-block-grid .slide:nth-child(2) .image-slide-title:after { content: "Banana 02"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } Many thanks for your time, Link to comment
tuanphan Posted October 18, 2021 Share Posted October 18, 2021 On 10/15/2021 at 4:13 AM, oeditorial said: Hello @tuanphan Sorry for the stupid question, but how do I use the '<br/>' within the following css snippet to create two lines in a tittle of a Gallery Section of a SS 7.1 site?: /* image 1 */ .sqs-gallery-block-grid .slide:nth-child(1) .image-slide-title:after { content: "Dinosaur line 2"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } /* Image 2 */ .sqs-gallery-block-grid .slide:nth-child(2) .image-slide-title:after { content: "Banana 02"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } Many thanks for your time, use this /* image 1 */ .sqs-gallery-block-grid .slide:nth-child(1) .image-slide-title:after { content: "Dinosaur \A line 2"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } /* Image 2 */ .sqs-gallery-block-grid .slide:nth-child(2) .image-slide-title:after { content: "Banana \A 02"; display: block; font-size: 13px; font-family: monospace; margin-top: -5px; } \A = <br/> 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
oeditorial Posted October 18, 2021 Share Posted October 18, 2021 Many thanks @tuanphan, you are a star!!! Link to comment
RT53 Posted November 10, 2021 Share Posted November 10, 2021 On 6/14/2020 at 4:04 PM, tuanphan said: Try use this in caption Hi! I'm trying to do the same thing as OP - I put this in the caption but it's not working for me. Is there something else I should be doing to make it work? I saw that OP wrote something about enabling HTML... didn't really understand that. Thank you! Link to comment
tuanphan Posted November 12, 2021 Share Posted November 12, 2021 On 11/10/2021 at 4:17 PM, RT53 said: Hi! I'm trying to do the same thing as OP - I put this in the caption but it's not working for me. Is there something else I should be doing to make it work? I saw that OP wrote something about enabling HTML... didn't really understand that. Thank you! Can you share link to page where you have problem? 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
AndyKhouri Posted November 15, 2022 Share Posted November 15, 2022 Is there a code to make line breaks in gallery grid titles? Using the "<br/>" code in the title text doesn't seem to work. Here's how I'm doing it (Screenshots). Link to comment
tuanphan Posted November 21, 2022 Share Posted November 21, 2022 On 11/15/2022 at 2:28 PM, AndyKhouri said: Is there a code to make line breaks in gallery grid titles? Using the "<br/>" code in the title text doesn't seem to work. Here's how I'm doing it (Screenshots). Gallery Title doesn't allow HTML tag. If you share link to your site, we can give a script code to make <br> tag work. You can also add this code to Settings > Advanced > Code Injection > Footer first, if it doesn't work, share link then. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".image-slide-title").each(function(){ $(this).html($(this).text()); }); }); </script> AndyKhouri 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
AndyKhouri Posted November 22, 2022 Share Posted November 22, 2022 22 hours ago, tuanphan said: Gallery Title doesn't allow HTML tag. If you share link to your site, we can give a script code to make <br> tag work. You can also add this code to Settings > Advanced > Code Injection > Footer first, if it doesn't work, share link then. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".image-slide-title").each(function(){ $(this).html($(this).text()); }); }); </script> Thanks so much! The code worked. One more question: is there a way to control the line height, letter spacing, etc. like with other text on the site? Doesn't seem to have an obvious control panel in the Font controls. Link to comment
tuanphan Posted November 25, 2022 Share Posted November 25, 2022 On 11/22/2022 at 2:16 PM, AndyKhouri said: Thanks so much! The code worked. One more question: is there a way to control the line height, letter spacing, etc. like with other text on the site? Doesn't seem to have an obvious control panel in the Font controls. You can use some code like this (Add to Page where you use Gallery) <style> /* this is code to style 2 lines */ .image-slide-title { font-size: 30px; color: red; line-height: 30px; } /* this is code to style first line */ .image-slide-title:first-line { font-size: 20px; margin-bottom: 20px; } </style> In CSS code, there is no attribute to target line 2, 3...but only attribute to target first-line, so I use the above method. AndyKhouri 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
Mads_Botkr Posted February 10 Share Posted February 10 Might be a little old topic, but would really like to know if there is a way to adjust the 2 lines seperately after writing this in a gallery caption: Project 1<br/>music Would like to be able to control lineheight, font size and make the typography centrered. Hope someone can help me out with this. :-) Link to comment
tuanphan Posted February 11 Share Posted February 11 On 2/10/2023 at 4:39 PM, Mads_Botkr said: Might be a little old topic, but would really like to know if there is a way to adjust the 2 lines seperately after writing this in a gallery caption: Project 1<br/>music Would like to be able to control lineheight, font size and make the typography centrered. Hope someone can help me out with this. 🙂 You can use this https://forum.squarespace.com/topic/164376-71-line-break-for-gallery-grid-captions/?do=findComment&comment=589029 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment