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

Fabrizio Rinaldi
Fabrizio Rinaldi
5,359 Points

Html Font-Color exercise

Question:Add the background texture.png from inside the img folder and set the background to repeat.

Answer:

/* Write your CSS below */

body {

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

}

Writing like that, it shows me a possible mistake about URL syntax but i can't find it.

Thanks for the help guys!

6 Answers

Keith Kelly
Keith Kelly
21,326 Points

I believe the issue is that you have a space between url and the parentheses.

take the word "repeat" out and then add background-repeat: no-repeat;

Keith Kelly
Keith Kelly
21,326 Points

Unfortunately this wouldn't work for this particular challenge because it was specifically looking for the background to be repeated.

Fabrizio Rinaldi
Fabrizio Rinaldi
5,359 Points

Thanks guys...i'm trying' everything possible but doesn't work.

Keith Kelly
Keith Kelly
21,326 Points

Here is the code that I was able to pass with:

/* Write your CSS below */
body {
  background: url('img/texture.png') repeat;
  background-color: #420600;
  color: #FAF3BC;
  font-family: Nunito, sans-serif;
}
Fabrizio Rinaldi
Fabrizio Rinaldi
5,359 Points

thanks Keith, i solved this exercise writing:

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

:)

Keith Kelly
Keith Kelly
21,326 Points

Combining all of those elements into a single background element is the method I would prefer as well. Good work!

Fabrizio Rinaldi
Fabrizio Rinaldi
5,359 Points

It's easier to read also! if you're working hard for programming you too we can help each other :) i found you on Facebook!

Good luck!

Yikes, Keith, I meant to say repeat, not "no-repeat". Sorry if I confused him even more!