Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

HTML & CSS Custom font css not working in Squarespace 7.0

j393

New Coder
My custom font CSS is not working in Squarespace 7.0. I have uploaded the font which is this font: https://connary.com/wayfinder.html



I am using this code to add the font, but nothing is changing and the font is not displayed.

Code:
@font-face {
font-family: 'Wayfinder';
src: url('https://static1.squarespace.com/static/603e9a9da51e5672d8d9633a/t/60c8026984d82a4fe9c58594/1623720553471/WayfinderCF-Thin.otf');
  }
h1 {font-family: 'Wayfinder';}


What am I doing wrong? PLEASE HELP
 
Try This -
HTML:
<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Wayfinder</title>
   
    <style>
        @font-face {
            font-family: 'Wayfinder';
            src: url('fonts/WayfinderCF-Thin.otf') format('opentype');
        }
        main {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        main > h1 {
            font-family: 'Wayfinder';
        }
    </style>
</head>

<body>
    <main>
        <h1>How Are You!</h1>
    </main>

</body>

</html>
 

Attachments

  • fontface.jpg
    fontface.jpg
    14 KB · Views: 2
Try This -
HTML:
<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Wayfinder</title>
  
    <style>
        @font-face {
            font-family: 'Wayfinder';
            src: url('fonts/WayfinderCF-Thin.otf') format('opentype');
        }
        main {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        main > h1 {
            font-family: 'Wayfinder';
        }
    </style>
</head>

<body>
    <main>
        <h1>How Are You!</h1>
    </main>

</body>

</html>
That did not work and it says there is a syntax error on line 3 I copied it exactly
 

Attachments

  • Screen Shot 2021-06-15 at 10.12.31 AM.png
    Screen Shot 2021-06-15 at 10.12.31 AM.png
    26.9 KB · Views: 1
If line 3 is this -
HTML:
<html lang="en">
Than don't worry. Browsers have their own rules and it will still display correctly even if there is syntax error in html. But in your webpage you have forgot to declare character encoding metadata. Please correct the error.
 

Latest posts

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom