Jump to content

Adding multiple fonts to a button

Recommended Posts

  • 2 years later...

This is a multi-part solution.

The first issue is that you can't address the default text of the button with CSS. To be able to address each word with CSS they need to be wrapped with a tag. In this case a span tag.

Please see the following.

Header CTA Buttons Each Word Span Tag Add

The second issue is creating some CSS to address the now spanned words.

First remove the following existing CSS, make a copy somewhere.

.header-actions-action a,.header-menu-cta a {
  font-family: "Karla" !important;
}

Add the following example CSS. Of course you will want to change the declarations to meet your need.

/* desktop */

#siteWrapper .header-actions-action--cta .btn span:nth-child( 1 ),

/* mobile */

#siteWrapper .header-menu-cta .btn span:nth-child( 1 )

{

  font-family : serif;
      
 }

This example code is specific to the poster's need.

Let me know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
2 hours ago, Belizabeth said:

I did what you said as best I could but I do not see a difference for this.

The font family for the button is already Karla. If you want it to look different you have to do something like bold it, change its weight or size, or change the font family. Try my example first so you can see that it works. You then need to make the CSS declarations for whatever effect you are trying to achieve.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.