I read it is a old thread, but I experience the same problem:
In my web root, I created 3 folders:
css
fonts
livres (where some of my html files are hosted)
main.css contains:
@font-face {
font-family: "Recoleta-SemiBold";
src: url('/fonts/Recoleta-SemiBold.woff') format('woff'),
url('/fonts/Recoleta-SemiBold.eot?#iefix') format('embedded-opentype'),
url('/fonts/Recoleta-SemiBold.ttf') format('truetype');
font-weight: 600; /* 500 for medium, 600 for semi-bold */
font-style: normal;
font-display: swap;
}
.header .title {
font-family: "Recoleta-SemiBold", "Georgia", serif;
font-size: 40px;
font-weight: normal;
margin: 0px;
padding-left: 10px;
color:#3f0ec6;
}
index.html contains:
In the <head>:
<base href = "https://www.yoga-kids.net/">
In the <body>:
<header>
<div class = "header">
<div class = "title">Livre de yoga</div>
</div> <!-- end header -->
</header>
The font is not shown when I open the index.html file (located in "livres" directory).
However, if I place the index.html file in the web root folder, the font is shown!!!
Same behavior on my local and on the server...
Any idea?
Thank you.