Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRyan Yue
8,548 PointsDjango static css background image not loading
I'm trying to set up my django website and I have some background images in my css file.
I try to reference the images by using
background:url(../img/background.jpg)
My css file is under a css folder which is under that static folder. My img folder is inside the static folder as well. I'm not sure why the image will not load.
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsIt looks like you're missing quotes around the url
path. Try:
background:url('../img/background.jpg')