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

General Discussion

Code Challenge Fonts and Colors #4

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

The code I have entered for the background is:

background: #420600; url('img/texture.png') repeat;

The error message I am getting is: Bummer! Make sure you put the relative path to the image inside of 'url()'.

I can't figure out why this is incorrect. It all looks right to me. Help would be greatly appreciated!

3 Answers

31,206 Points

The semicolon after your hex code ends the background statement, leaving your url string all alone. You can either use separate rules, or use the shorthand like follows:

background: url('img/texture.png') #420600;

background: url('img/texture.png') repeat #420600; Add the repeat and this works fine. Thanks for the help!

31,206 Points

Repeat should be the default value.