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 trial

CSS

Background

Im trying to get a background but its not showing up. Heres what I have

.box{ background-image: url('img/wood.jpg'); }

2 Answers

Ron McCranie
Ron McCranie
7,837 Points

Probably an issue with the location of the image relative to the page. The CSS looks fine assuming the file is in fact where you're referencing.

yes it worked i had to take off the "img/" part thanks a ton.