On Mar 27, 7:33 am, Gath <pgath...@gmail.com> wrote: > Guys, > > Am having a problem in displaying images in my CSS file. > > I have a css file with the following class > > .header > { > margin-left: auto; > bla bla > bla bla > ... > background: url(/site_media/header_background.gif) no-repeat top left; > > } > > When i execute the template with this css, no image is displayed! > But when i directly inject the background style on my template it > works perfect. > > What am i not doing right! >
I seem to recall that when you put references to files in your CSS, they are relative to that CSS file, not to the document root. So if that graphic file is in the same directory as your CSS file, change your url to: background: url(header_background.gif) no-repeat top left; Best, BN --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---