Lettercutter Posted September 27, 2023 Share Posted September 27, 2023 Hello, hoping someone could help me with a styling problem. I'm selling books in my store and would like to include the Title and Sub-title in the 'product name' field. I've seen the article 'Split product titles onto two lines with Squarespace' and it's styling options. This isn't the approach I'd like to take, I'd like the main title to appear as I currently have it 'normal', and everything after the colon to appear 'italic', but I don't want to force any line breaks. I haven't published yet but I'll attach a screenshot below. For example: Letters for the Millennium: Why We Cut Letters in Stone. Thank you in advance, John knollgrind 1 Link to comment
KwameAndCo Posted September 27, 2023 Share Posted September 27, 2023 The amazing @paul2009 at SF.Digital has you covered, I believe. https://sf.digital/squarespace-solutions/display-product-titles-on-two-lines-with-squarespace-71#:~:text=Squarespace doesn't allow HTML,it appears over two lines. Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 For Custom Plugins email me 🧩 Link to comment
Lettercutter Posted September 27, 2023 Author Share Posted September 27, 2023 Thank you, I did try this method, but it requires a line break to alter the second style. I'd like to change the style of the sub-title without introducing a second line if that makes sense... Link to comment
KwameAndCo Posted September 27, 2023 Share Posted September 27, 2023 (edited) I believe the code Paul provided covers this. /* Style examples for Product Titles */ /* Product Title: smaller second line on product detail page */ .ProductItem .ProductItem-details h1.ProductItem-details-title, .products.collection-content-wrapper .grid-main-meta .grid-title { font-size: 22px; line-height: 1.8em; } /* Product Title: larger first line on product detail page */ .ProductItem .ProductItem-details h1.ProductItem-details-title:first-line, .products.collection-content-wrapper .grid-main-meta .grid-title:first-line { font-size: calc(2.16vw + 1rem); } You should just be able to add your italic code here. Edited September 27, 2023 by KwameAndCo Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 For Custom Plugins email me 🧩 Link to comment
KwameAndCo Posted October 31, 2023 Share Posted October 31, 2023 @Lettercutter Does this help? If not, I actually wrote a plugin a while back that does this that I didn't release. I might be able to dig up and package it so I can put it out there and share. Work With Me 🖥️💻📱 Please remember to tag me so that I get a notification and respond to your help requests. If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly. You can also thank me or make requests by buying me a coffee ☕. (Caffeine fuels me to take more requests) For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials) For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩 For Custom Plugins email me 🧩 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