I have this very basic index.gsp file:
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main"/>
<title>Example</title>
<link type="text/css" href="${resource(dir: 'css', file: 'main.css')}" />
</head>
<body>
<div class="test">This should be in cursive and blue</div>
</body>
</html>
I also have a very basic main.css file:
.test {
font-family: cursive;
color: blue;
}
The path of main.css is web-app/css. I feel like this is a very trivial problem, but I can't get my line to show up in cursive and blue. However when I add the following to the head segment of my gsp file it works just fine:
<style>
.test {
font-family: cursive;
color: blue;
}
</style>
Why won't my css file work with my gsp file?
Aucun commentaire:
Enregistrer un commentaire