Reputation: 11
I have a node app that has three jade files, where they all connoted through the extends method... The parent template, home.jade, is:
html
head
link(rel='stylesheet', href='../public/stylesheets/style.css', type="text/css")
body
p.title home
block out_home
Don't worry about the last line. Its irrelevant. The problem is that the style.css is not being found (console shows 404 on /style.css). The layout of the files is the standard one made my express:
app/
node_modules/
public/
images/
javascripts/
stylesheets/
style.css
app.js
routes/
views/
home.jade
^^ shows whats relevant.
My style.css:
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
background-color: red;
}
.title{
color:green;
}
Why is jade not finding my style.css?
Thanks for any help.
Upvotes: 0
Views: 722
Reputation: 12275
Jade does not process your css files. Browser does.
href='../public/stylesheets/style.css'
is a probably invalid location. Does your app have any static middleware (i.e. express.static) set up? Anyway, it should probably be href='/stylesheets/style.css'
instead.
Upvotes: 2