url() must be given a url, not a file path. You need to put the image somewhere that is being served by apache, or by the development server (usually a subdirectory of 'media/' or similar) and then use the corresponding url. For example, when running the devolopment server in /home/me/djprojects/proj1 where I have my MEDIA_ROOT set to '/home/me/djprojects/proj1/site_media/' and my MEDIA_URL set to '/site_media/', and the image has be moved or copied to be /home/me/djprojects/proj1/site_media/images/foo.jpg then the right thing to put in the css is url(/site_media/images/foo.jpg) - note that no quotes are used either.
On Wed, Apr 28, 2010 at 10:51 AM, luca72 <[email protected]> wrote: > Hello i have a problem when i render with django a background image > with css: > simple css: > > div#main {position: absolute; top: 20%; left: 20%; bottom: 0; right: > 0; overflow:scroll; background-color: black; color:red; font- > size:medium; font-family: TimesNR, serif; font-weight: bold;background- > image: url('/home/lucak904/Scrivania/Luca/Webframework/Jacopo/ > genova_3.JPG');} > > this css is in html file all the other instruction are executed, but > not the backgound-image can you geve me the correct way to do it. > > Thanks > > Luca > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

