JMichal Posted March 17, 2021 Share Posted March 17, 2021 (edited) Site URL: https://mdforvitality.squarespace.com/ Hello all, I'm looking to force my header button to break into two lines of text. My client needs a long button title, but it takes up too much room in the header with only one line of text. Thanks so very much in advance! Site password is: vitality Edited March 17, 2021 by JMichal added password Link to comment
isensmith Posted March 17, 2021 Share Posted March 17, 2021 (edited) ?? { max-width: 200px; white-space: normal; text-align: center; } I'm still fuzzy on how to target specific elements in squarespace code (wish they'd let me uniquely id and class elements myself), so the ??s should be replaced with whatever you need to target that button. The words will break naturally if you give them a smaller container, hence setting a max-width. Some suggestions for trying in the ?? space: .theme-btn--primary-inverse .header-actions-action--cta a .header-actions--right a Hope that works Edited March 17, 2021 by isensmith Link to comment
JMichal Posted March 17, 2021 Author Share Posted March 17, 2021 Thanks you for the quick response, isensmith. Those ID's did not work, sadly. Link to comment
isensmith Posted March 17, 2021 Share Posted March 17, 2021 Actually they were classes, not ids, sorry i forgot to include the "." (i've edited my post and added them now. See of one of them works now? Link to comment
tuanphan Posted March 24, 2021 Share Posted March 24, 2021 Do you still need help? 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
Greenroom Posted January 10, 2022 Share Posted January 10, 2022 @tuanphan Hi 🙂 I am needing the same answer for site: www.auconsulting.co.nz - Is there anyway to split the english and māori for each navigation link into two lines? and if possible fill the Māori text in a different colour? Link to comment
tuanphan Posted January 12, 2022 Share Posted January 12, 2022 On 1/11/2022 at 12:20 AM, Greenroom said: @tuanphan Hi 🙂 I am needing the same answer for site: www.auconsulting.co.nz - Is there anyway to split the english and māori for each navigation link into two lines? and if possible fill the Māori text in a different colour? Add to Design > Custom CSS header#header a[href="/about-us"]:after { content: "Ko wai mātou"; display: block; color: red; } header#header a[href="/what-we-do"]:after { content: "Ā mātou mahi"; display: block; color: red; } header#header a[href="/nga-matapono"]:after { content: "Ngā Mātāpono"; display: block; color: red; } header#header a[href="https://educate.auconsulting.co.nz"]:after { content: "Akoranga ā-rorohiko"; display: block; color: red; } header#header a[href="/connect"]:after { content: "Hono mai"; display: block; color: red; } entrepreneuress and Greenroom 2 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
Greenroom Posted January 17, 2022 Share Posted January 17, 2022 @tuanphan Thank you so much!! works perfectly 🙂 Link to comment
nathan.j.p Posted January 12, 2023 Share Posted January 12, 2023 @tuanphan tried to use the :after psuedo-element and display block to achieve a second line on my buttons, but it only worked on the header button. All other buttons displayed the secondary text inline. Do I need to modify the code in a different way to have two lines in a button Link to comment
tuanphan Posted January 15, 2023 Share Posted January 15, 2023 On 1/13/2023 at 3:21 AM, nathan.j.p said: @tuanphan tried to use the :after psuedo-element and display block to achieve a second line on my buttons, but it only worked on the header button. All other buttons displayed the secondary text inline. Do I need to modify the code in a different way to have two lines in a button Hi, What is your site url? We can check 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