Jump to content

CSS Code Needed for Custom Font for Submit Button in Form

Go to solution Solved by inside_the_square,

Recommended Posts

Hello,

 

I've reviewed several forum posts discussing the problem of customizing the "Submit" button font within a form using CSS. Despite attempting various CSS codes recommended, none have proven effective. I require the custom font for both a regular form and a contact form. Although the following code appears to be commonly used, it does not result in any noticeable changes:

@font-face {
    font-family: Cunia;
    src: url(https://static1.squarespace.com/static/65a30bf07c8164487c03a9a8/t/65a32a7648ce18428d1ff916/1705192054542/Cunia.ttf);
}
.sqs-block-button-element {
    font-family: Cunia!important;
}

 

Am I missing something?

(I need the font that's shown in the "View Our Sample Menu" button to match the "Submit" button below.

Screenshot2024-02-15at3_02_15PM.thumb.png.d98c10c5294c4336ada0ab2f0098a0d2.png

Link to comment

Can you share your website URL?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

Hi @tuanphan,

Thanks so much for getting back to me and sending this. However, I am wanting to do the opposite. I am wanting the font in the "Submit" button in the form itself to be changed to "Cunia" font and not "Varela", essentially to match the font in the button that says "View Our Sample Menu". I tried using your code but the block id # isn't even showing on the Submit button in the form for some reason. Any suggestions?

Link to comment
  • Solution

Hey @uhohitsheidiho - this is a great question! The block id is for the whole form, so you'll need to add the selector for the button inside that block. This code will change that font for ya: 

.form-wrapper .sqs-button-element--primary {
font-family: Cunia!important
}

Hope that helps and best of luck with your project! ☺️

P.S. If you have more than one form on your site, you don't need to use the block id! If you use the code name ".form-wrapper .sqs-button-element--primary" all of your contact forms will get the same font family change. 

🤓 Creator of InsideTheSquare.co
SQUARESPACE CIRCLE LEADER SQUARESPACE EXPERT SQUARESPACE EMPLOYEE EDUCATOR CERTIFIED CUSTOM CODE EXPERT

🗺️ New to Squarespace? Get your free roadmap: insidethesquare.co/roadmap
🙋‍♀️ New to CSS? Learn the basics for free: insidethesquare.co/learn
️ Ready to go pro? Get my custom code collection: insidethesquare.co/css

 

BeccaHarpain.gif.236d6ddd88c7d637645b762799f501a8.gif

 

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.