I am facing a weird problem and I am stuck at the moment. I have a java application running in tomcat on my local machine. Recent requirement was to include a new font for the app. I downloaded the font and put in under a folder lookandfeel where my style.css is.
Current Folder structure
in my style.css I am importing the font using the following code
@import url("/font/stylesheet.css"); html {font-family: "Clarimo UD PE", Helvetica, Sans-Serif;}
But when I run my code it still uses ‘Helvetica’ and my folder structure is this
Somehow it is not deploying the font folder. Am I missing something ?
Advertisement
Answer
I can’t see your whole file tree but by the looks of things the directory called “lookandfeel” is inside the root directory.
Your import URL is looking for a directory called font which is a child of the root directory. I think you meant to use “font/stylesheet.css” or “/lookandfeel/font/stylesheet.css”