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

Difficulty getting through Web Design, Challenge Task 4 of 4.

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

My answer is as follow: body { font-family: 'Nunito', Sans-Serif;
color: #FAF3BC; background-color: #420600 url('css\img/texture.png') repeat;
}

I have also tried: body { font-family: 'Nunito', Sans-Serif;
color: #FAF3BC; background-color: #420600 url('img/texture.png') repeat;
}

Both of these tells me oops, your wrong.....

Can someone please help.

Thanks

5 Answers

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

You're using the background-color property--that only adds a color. You need to use the background property, instead.

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

John's right. This code challenge is asking you to use both the background-color and background-image properties:

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

However, it's technically accurate to just the background property like this:

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

This won't pass the code challenge, however.

Tried it on the background property only but still no luck. Any other suggestions?

body { font-family: 'Nunito', Sans-Serif; color: #FAF3BC; background: #420600 url('img/texture.png') repeat; }

Way to go, Thank you everyone for your input.