Jump to content

Error installing font on website

Recommended Posts

Hey.

I am trying to use a font on a site and this is the code. Keep getting an error on it 😞

The site is nordleica.com

Any ideas?

 

  @font-face {
  font-family: NN1050_ICELANDIC.otf;
  src: url(https://static1.squarespace.com/static/608414f01583fd6e39d553bb/t/65a02f58c8199c67d9f38903/1704996696569/NN1050_ICELANDIC.otf);
  }
  h1 {
font-family: 'NN1050_ICELANDIC.otf ;
}

h2 {
font-family: 'NN1050_ICELANDIC.otf';
}

h3 {
font-family: 'NN1050_ICELANDIC.otf';
}

.sqsrte-large {
font-family: 'NN1050_ICELANDIC.otf';
}

p {
font-family: 'NN1050_ICELANDIC.otf';
}

.sqsrte-small {
font-family: 'NN1050_ICELANDIC.otf';
}

Link to comment
  • Replies 4
  • Views 1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

What error are you getting? You appear to have a potential missing quote mark, I've clean up your CSS here:

@font-face {
  font-family: 'NN1050_ICELANDIC';
  src: url('https://static1.squarespace.com/static/608414f01583fd6e39d553bb/t/65a02f58c8199c67d9f38903/1704996696569/NN1050_ICELANDIC.otf');
}
h1 {
  font-family: 'NN1050_ICELANDIC';
}

h2 {
  font-family: 'NN1050_ICELANDIC';
}

h3 {
  font-family: 'NN1050_ICELANDIC';
}

.sqsrte-large {
  font-family: 'NN1050_ICELANDIC';
}

p {
  font-family: 'NN1050_ICELANDIC';
}

.sqsrte-small {
  font-family: 'NN1050_ICELANDIC';
}

 

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

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

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

 Did I help? Buy me a coffee?

Link to comment

missing closing `}` is the error. I have no idea where it is missing. 🙂 Maybe I am doing this wrong. 

Here is the whole custom css. 

.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
  text-align: center;
  max-width: inherit;
}

/* Masonry one item on mobile */
@media screen and (max-width:767px) {
    .gallery-masonry-wrapper.gallery-masonry-list--ready {
    height: auto !important;
}
figure.gallery-masonry-item {
    position: relative !important;
    width: 100% !important;
    transform: unset !important;
}
.gallery-masonry-item-wrapper {
    height: auto !important;
}
.gallery-masonry .gallery-masonry-item[data-loaded] img {
    width: 100% !important;
}
.gallery-masonry {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
  
.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
  text-align: center;
  max-width: inherit;
}

/* Masonry one item on mobile */
@media screen and (max-width:767px) {
    .gallery-masonry-wrapper.gallery-masonry-list--ready {
    height: auto !important;
}
figure.gallery-masonry-item {
    position: relative !important;
    width: 100% !important;
    transform: unset !important;
}
.gallery-masonry-item-wrapper {
    height: auto !important;
}
.gallery-masonry .gallery-masonry-item[data-loaded] img {
    width: 100% !important;
}
.gallery-masonry {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
  
 @font-face {
  font-family: 'NN1050_ICELANDIC';
  src: url('https://static1.squarespace.com/static/608414f01583fd6e39d553bb/t/65a02f58c8199c67d9f38903/1704996696569/NN1050_ICELANDIC.otf');
}
h1 {
  font-family: 'NN1050_ICELANDIC';
}

h2 {
  font-family: 'NN1050_ICELANDIC';
}

h3 {
  font-family: 'NN1050_ICELANDIC';
}

.sqsrte-large {
  font-family: 'NN1050_ICELANDIC';
}

p {
  font-family: 'NN1050_ICELANDIC';
}

.sqsrte-small {
  font-family: 'NN1050_ICELANDIC';
}

Edited by hilmartor
more information
Link to comment

The error is somewhere in this:

.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
 text-align: center;
 max-width: inherit
}

/* Masonry one item on mobile */
@media screen and (max-width:767px) {
 .gallery-masonry-wrapper.gallery-masonry-list--ready {
 height: auto !important
}
figure.gallery-masonry-item {
 position: relative !important;
 width: 100% !important;
 transform: unset !important
}
.gallery-masonry-item-wrapper {
 height: auto !important
}
.gallery-masonry .gallery-masonry-item[data-loaded] img {
 width: 100% !important
}
.gallery-masonry {
 padding-left: 0 !important;
 padding-right: 0 !important
}

.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
 text-align: center;
 max-width: inherit
}

/* Masonry one item on mobile */
@media screen and (max-width:767px) {
 .gallery-masonry-wrapper.gallery-masonry-list--ready {
 height: auto !important
}
figure.gallery-masonry-item {
 position: relative !important;
 width: 100% !important;
 transform: unset !important
}
.gallery-masonry-item-wrapper {
 height: auto !important
}
.gallery-masonry .gallery-masonry-item[data-loaded] img {
 width: 100% !important
}
.gallery-masonry {
 padding-left: 0 !important;
 padding-right: 0 !important
}

Link to comment

Your code missed 2 closing } symbols

then code should be

.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
 text-align: center;
 max-width: inherit
}

/* Masonry one item on mobile */
@media screen and (max-width:767px) {
 .gallery-masonry-wrapper.gallery-masonry-list--ready {
 height: auto !important
}
figure.gallery-masonry-item {
 position: relative !important;
 width: 100% !important;
 transform: unset !important
}
.gallery-masonry-item-wrapper {
 height: auto !important
}
.gallery-masonry .gallery-masonry-item[data-loaded] img {
 width: 100% !important
}
.gallery-masonry {
 padding-left: 0 !important;
 padding-right: 0 !important
}

.gallery-caption-grid-simple, .gallery-caption-grid-strips, .gallery-caption-grid-masonry {
 text-align: center;
 max-width: inherit
}
}

 

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.