Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
taymbec

How do I use a custom font for site title in CSS? (Native template)

Question

Hi! I'm super new to CSS and coding so please be as thorough as possible. I downloaded a custom font (HelveticaNow) and I have successfully applied it to my headers and body text through CSS. If it's relevant, the template I am using is Native. Here is what has worked for me as far as body text goes:

  1. @font-face {
  2. font-family: 'HELVETICANOW';
  3. src: url('https://static1.squarespace.com/static/5d6c2d758a0acc000187f3f5/t/5d795050146faa22dd3e6e24/1568231504475/HelveticaNowDisplayXBlk.otf');
  4. }
  5. p {font-family: 'helveticanow';}
  6. font-size: 14px;

I've also gotten the headers to work using a nearly identical code (just putting h1, h2, h3, etc., in place of the p on line 6).

My trouble now comes with trying to apply this to the site title. I've looked at numerous Q&A's and videos but nothing has worked for me. I also have yet to attempt adding a custom font to the navigation bar, though I would also like to eventually do that aswell; if someone could include the coding for the navigation bar in addition to the site title, that would be awesome. Thanks!

(p.s.) Since I am so incredibly new to CSS, I would greatly appreciate a simple copy-and-paste solution, if possible :)

Edited by taymbec
retag

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

@taymbec


/* Custom Font - Site Title */
.site-title span {
   font-family: 'HELVETICANOW' !important;
}
/* Custom Font - Header Main Navigation */
.main-nav * {
   font-family: 'HELVETICANOW' !important;
}

Reference: https://beaverhero.com/native-squarespace/

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...