Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Grav CMS links in css

Started by Will Tran 8 years ago · 0 replies · 719 views
8 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 Marcel, 5 days ago
0 88 5 days ago
Support · by JakobDB, 6 days ago
1 92 6 days ago
Support · by ramenos, 7 days ago
3 106 6 days ago
Support · by gravinator, 2 weeks ago
3 231 1 week ago
Support · by Roger Parkinson, 2 weeks ago
3 311 2 weeks ago