On 28 Apr 07:51, luca72 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.
You can't point to a local file, the css is parsed by the browser *not* the server, so the url should point to the correct url that that image will be served from. *If* you're only running it and viewing it from your local machine, then adding file:// to the beginning of the url should work, i.e. background-image: url(file:///home/lucak904/Scrivania/Luca/Webframework/Jacopo/genova_3.JPG); Thanks, -- Brett Parker -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.