[Solar-talk] CSS with image urls

Rodrigo Moraes rodrigo.moraes at gmail.com
Sun Dec 24 05:47:19 PST 2006


On 12/24/06, Andreas Ravnestad wrote:
> I usually just use relative url's like this: url('/path/to/style.css'). If
> you need absolute urls, you could inline your css in a template and get the
> absolute url from config, possibly. What hacks have you tried?

Yes, this is the answer, except that the example is not good if the
location of the CSS file is configurable. For common layout images,
make sure that the images directory is always in the same location
*relatively* to the CSS directory, and them use something like:
url(../images/image.gif). For inline rules, parse them inside a
template, as Andreas said.

rodrigo


More information about the solar-talk mailing list