[pLog-general] Q: Template / CSS included files

Oscar Renalias oscar at renalias.net
Sat Jan 1 17:31:30 GMT 2005


Happy new year to you too :-)

Regarding images in css files, you don't need to do anything fancy with 
paths. Paths in CSS files are always relative to the folder where the 
CSS file was loaded, so if a CSS file was loaded from 
http://sever/plog/templates/blog_1/style.css and you want to specify a 
path to an image (like a background image in the css file):

body {
	background-image: url("./background.jpg")
}

Here "./" is relative to http://sever/plog/templates/blog_1/, not 
relative to where the page itself is.

Of course we can specifiy absolute paths as well but it is not usually 
needed.

Oscar

On 1 Jan 2005, at 12:23, Reto Hugi wrote:

> Hi,
>
> First things first: Happy new Year and all the best for 2005!
>
> ...and here goes my question:
> My template uses css styles which include images for some backgrounds. 
> I
> know about the new $url->getTemplateFile but IMO this cannot be done
> inside the css file. Or is there a way to get the css parsed by smarty?
>
> Thought about putting these files in /imgs/<templatename>/ but that
> would lead back to the problems $url->getTemplateFile should have 
> solved...
>
> Any suggestions are very welcome!
>
> Bye,
> reto
>
> PS @ Oscar: Did you get my IE7 package?
>
> _______________________________________________
> pLog-general mailing list
> pLog-general at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-general
>




More information about the pLog-general mailing list