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 trialFabrizio Rinaldi
5,359 PointsHtml 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
21,326 PointsI believe the issue is that you have a space between url and the parentheses.
Diane Houghton
5,773 Pointstake the word "repeat" out and then add background-repeat: no-repeat;
Keith Kelly
21,326 PointsUnfortunately this wouldn't work for this particular challenge because it was specifically looking for the background to be repeated.
Fabrizio Rinaldi
5,359 PointsThanks guys...i'm trying' everything possible but doesn't work.
Keith Kelly
21,326 PointsHere 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
5,359 Pointsthanks 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
21,326 PointsCombining all of those elements into a single background element is the method I would prefer as well. Good work!
Fabrizio Rinaldi
5,359 PointsIt'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!
Diane Houghton
5,773 PointsYikes, Keith, I meant to say repeat, not "no-repeat". Sorry if I confused him even more!