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

Sean Flanagan
Sean Flanagan
33,235 Points

Putting relative paths inside URL

Hi.

I'm struggling with Task 4 of this code challenge. It tells me to put the relative path inside the URL. Here's the code I've written:

body {
  font-family: 'Nunito', sans-serif;
  color: #faf3bc;
  background: #420600 url('img/bg-texture.jpg') repeat;
}

I've gone over the CSS with a fine-tooth comb but I can't find anything wrong with the code. Upon posting this, I notice the hashes and single quotes are highlighted in orange, which tells me something is up, but I can't figure out what. I'd really appreciate some help here.

Thanks.

Sean

4 Answers

Hi Sean,

The image filename is "texture.png"

Benjamin Bornschein
Benjamin Bornschein
1,364 Points
body {
  font-family: 'Nunito', sans-serif;
  color: #faf3bc;
  background: #420600 url('./img/bg-texture.jpg') repeat;
}

Your code is fine, the highlighter is just wrong.

Sean Flanagan
Sean Flanagan
33,235 Points

Thanks for your contribution. Tried that. It still won't accept it.

Sean Flanagan
Sean Flanagan
33,235 Points

Is this it Jason?

body {
  font-family: 'Nunito', sans-serif;
  color: #faf3bc;
  background: #420600 url('img/bg-texture.png') repeat;
}

I've typed it and it still says it's wrong.

You're using bg-texture.png but it's texture.png

Try dropping the bg-

Sean Flanagan
Sean Flanagan
33,235 Points

Hi Jason. I've done it and it's worked. Thanks very much. :-)

You're welcome.