Jump to content

Header Button with 2 lines of text in Squarespace 7.1

Recommended Posts

?? {
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 by isensmith
Link to comment
  • 9 months later...
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;
}

 

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
  • 11 months later...
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.