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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Grav CMS links in css

Started by Will Tran 7 years ago · 0 replies · 578 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 Thomas, 1 week ago
3 92 3 hours ago
Support · by Anna, 3 days ago
2 94 24 hours ago
Support · by Justin Young, 1 day ago
1 62 1 day ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 91 6 days ago