i am trying to get access to my static images directory (/static/myapp/images/) from inside of a css file.
i initially tried this:
{% load staticfiles %}
#header {
position:relative;
width: 680px;
height:99px;
margin-left:29px;
margin-right:21px;
background: url({% static 'myapp/images/header.png' %}) no-repeat;
}
but this did not work
this however works fine:
#header {
position:relative;
width: 680px;
height:99px;
margin-left:29px;
margin-right:21px;
background: url(../images/header.png) no-repeat;
}
does Django template language work inside of css files?
or is it just my syntax, and lack of understanding off css! this css comes from a simple template i downloaded, i no nothing about css, is there another way to link an image here that the template language will work with?
thanks!