Jump to content

Use CSS to make a word on the entire site bold. Or just a word in title (but not the entire title).

Recommended Posts

  • katemadsen changed the title to Use CSS to make a word on the entire site bold. Or just a word in title (but not the entire title).
  • 3 months later...
12 hours ago, lloyd_spark said:

I'm trying to do something similar here. I'd like my site title to be "Spark Structures". So first word is normal, second word is bold. Any help would be much appreciated.

Site URL: bamboo-lizard-w5nd.squarespace.com
Password: spark

Thanks.

Add to Design > Custom CSS

a#site-title:before {
    content: "Spark";
    font-size: calc(~"(2.2 - 1) * 1.2vw + 1rem");
}
a#site-title {
    font-size: 0;
    font-weight: normal;
}
a#site-title:after {
    content: " structures";
    font-size: calc(~"(2.2 - 1) * 1.2vw + 1rem");
    font-weight: bold;
}

 

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
23 hours ago, lloyd_spark said:

I'd like my site title to be "Spark Structures". So first word is normal, second word is bold.

I started work on a JavaScript way to do what you want late last night ( 😴 ) but didn't finish until this morning. 

@tuanphan's method is a crafty use of CSS to get the job done! 👍

My alternate method attempts to address the fundamental issue with the site title, in that you can't address the individual words of the title with CSS.

Please see Site Title Each Word Span Tag Add.

The code is a base effect so you have to add CSS to achieve the final effect.

For your issue it would be something like the following.

#site-title span:nth-child( 2 ) {

  font-weight : bold;
  
  }

 

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.