I think it is better for you to keep CSS images in /static folder too.
/media is better suited as a folder to host user-loaded content.

If you keep CSS and images in /static you can just refer to them with
a relative path.

I think that probably (but I'm not sure) CSS can only address relative
paths from their location.

Regards

Leo

2012/2/15 Kolbe <maximilian.jack...@gmail.com>:
> Hi all,
>
> I have a .css file in the /static/ folder where I keep all my styles.
>
> Now when I want to refer to images that I use in my CSS that are
> stored in the /media/ folder, how do I reference that?
>
>
> e.g. background-image:url('gradient2.png');
>
> gradient2.png is stored in ~/media/ and my css is in ~/static/
>
> Is there a way to define the path to gradient2.png?
>
> Cheers!
> Max
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to