cancel
Showing results for 
Search instead for 
Did you mean: 

trouble accessing stylesheet

lucille_arkenst
Champ in-the-making
Champ in-the-making
I am trying to access a stylesheet in the same folder as my freemarker template.  How come the page doesn't render with the styles?
<link rel="stylesheet" href="main.css" TYPE="text/css"> 
This is driving me crazy.  I appreciate anyone's advice…
3 REPLIES 3

mangar
Star Contributor
Star Contributor
Does anyone have an answer for this?  I am trying to make my manager happy and add pretty colors to my freemaker dashlet.  I have my css is the same folder as the ftl, but I cannot get the pretty colors to show up.

mikeh
Star Contributor
Star Contributor
The CSS file needs to be directly addressable from the browser, rather than via the webscript runtime (which is how the Freemarker is being processed).

Put your CSS file somewhere outside WEB-INF, or in a separate webapp and address it directly, e.g. "/css/main.css".

Thanks,
Mike

mangar
Star Contributor
Star Contributor
Worked Perfect!  Thank you. Who would have thought it was just like a regular HTML link! Ahh, simpler times….