Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Grav CMS links in css

Started by Will Tran 7 years ago · 0 replies · 692 views
7 years ago

I have a problem with adding the custom fonts in Grav CMS. All fonts are added under the folder path: user/themes/bildxwerkstatt/fonts

It works on my computer when I'm adding this code in .css file
<code>
@font-face {
font-family: MullerBlack;
src: url(/bildxwerkstatt/user/themes/bildxwerkstatt/fonts/Muller/MullerBlack.otf);}
h1, h2, h3, h4, h5, h6 {
font-family: MullerBlack, sans-serif!important;}
</code>
However on the host such path does not work.

As I understood from the Grav documentation the path to font in css should looks like this:
<code>
url(theme:fonts/Muller/MullerBlack.otf);}
</code>
But it does not work in my case. The same problem I have when trying to add background image in css.

Thank you in advance!

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 485 5 days ago
Support · by Lauw, 7 days ago
2 101 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 4 weeks ago