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 trialJC du Plessis
4,775 PointsDifficulty 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
Treehouse TeacherYou're using the background-color property--that only adds a color. You need to use the background property, instead.
Dave McFarland
Treehouse TeacherJohn'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.
JC du Plessis
4,775 PointsTried 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; }
John Steer-Fowler
Courses Plus Student 11,734 PointsYou might want to try background-image property
JC du Plessis
4,775 PointsWay to go, Thank you everyone for your input.
Nick Pettit
Treehouse TeacherNick Pettit
Treehouse TeacherLook at Dave McFarland already helping out on the forum. I like you.
John Steer-Fowler
Courses Plus Student 11,734 PointsJohn Steer-Fowler
Courses Plus Student 11,734 PointsI would 'like' this comment if I could :P
Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherNick Pettit :)