Can't apply custom font (Tailwind CSS)
So I'm trying to add a custom font (not from Google Fonts), however, when I create a new
@font-face
property in the input.css file, it doesn't apply the font.
Here's what I've done so far:6 Replies
And this is how it looks like:
you didnt specify the font-weight the font is for
instead of starting the path with
../
, use /
OK, thanks!
And also - hi again!
Yaaaay, it worked!
š
awesome!
remember: for css, the paths are relative to the file location
so, you would have to either use
/
at the beginning or use ../fonts/....otf
instead
the best is the /
because it will always use the root as a starting point, and you dont need to fix paths if you move the css file to another folderI see - I didn't know that only
/
will make it use the root as the start point.
Thanks for the tip!you're welcome