r/csshelp • • Feb 27 '24

Request font face does not work

the font is highlighted but the face part isn't i did everything correct I even copy pasted some of the code from w3schools and it did not work I looked at stack overflow to see if someone had a similar problem but no one did

1 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/SHAGGYKing Feb 28 '24

here is the link to what i want to do

https://www.youtube.com/watch?v=yfwD-AKRCcA

here is my code

1

u/SHAGGYKing Feb 28 '24

<html> <head> <title>Your Page Title</title> <link rel="stylesheet" type="text/css" href="my_style.css"> <link href='https://fontmeme.com/fonts/budmo-jiggler-font/ ' rel='stylesheet' type='text/css'> </head> <body>

<!--Inside the body tag is where you put all the cool stuff you want on your page!-->

<div="bob" data-splitting>
FIGHTING GAME CHHARACTER FIGURES

</div>

<script src ="splitting.js"> </script>

<script> Splitting(); </script>

</body> </html>

body{
background-image:url("https://img.freepik.com/free-photo/starry-night-sky_1048-11828.jpg");
}
@font-face {
font-family: "Budmo Jiggler V2";
src: url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.eot");
src: url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.eot?#iefix")format("embedded-opentype"),
url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.woff2")format("woff2"),
url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.woff")format("woff"),
url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.ttf")format("truetype"),
url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.svg#Budmo Jiggler V2")format("svg");
}

1

u/j-aktiga Feb 28 '24

Are you attempting to add the class `bob` to your div? If so, you need to add the class keyword.

I was able to get this font to work from the following:

<!-- index.html -->

<html>
<body>
  <h1>Hello from Budmo
<body>
</html>

// styles.css

@font-face {
    font-family: "Budmo Jiggler V2";
    src: url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.eot");
    src: url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.eot?#iefix")format("embedded-opentype"),
    url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.woff2")format("woff2"),
    url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.woff")format("woff"),
    url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.ttf")format("truetype"),
    url("https://db.onlinewebfonts.com/t/9cf1bc67e95687ab28ba321ca6db3db9.svg#Budmo Jiggler V2")format("svg");
}

h1 {
  font-family: "Budmo Jiggler V2";
}