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

HTML Build a Simple Website Styling Content Fonts and Colors

Challenge task 4 of 4

/* Write your CSS below */ body { font-family: 'Nunito', sans-serif; color: #FAF3BC; background: #420600 url( 'img/bg-texture.jpg') repeat; } This is my code, copied directly from my CSS for the webpage, rejected in the challenge. What it said is "Bummer! Make sure you put the relative path to the image inside of 'url().'

4 Answers

Robert Goddard
Robert Goddard
15,019 Points

The question states: "Add the background texture.png from inside the img folder and set the background to repeat."

Instead of img/bg-texture.jpg , use img/texture.png .

Robert Goddard
Robert Goddard
15,019 Points

I think the challenge question tells you what directory the bg-texture.jpg image is assumed to be in. If not, try it without the img/ before it. So: url('bg-texture.jpg')

Can you provide a link to the challenge?

Also, I sometimes find the editor can act a bit strangely, you often need to refresh the page (and clear the cache ) to get it to work, so if you haven't already give that a try.

Robert, thanks, your response was immediate. And thanks, James also. I tried all of your suggestions, and got it to work finally. Sorry my response was not immediate, but I have been buried with other classwork, as well as html. But with your help I was able to conquer. Thank you very much!