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
satya jr
3,351 PointsSmells like bakin' Styling content -- Whats wrong with my code?
I am taking a challenge in Smells like Bakin>Styling content>Font colors I am supposed to "Add the background texture.png from inside the img folder and set the background to repeat" The below is the code I tried and it wont work. Can someone point out what I did wrong?
body{ font-family:'Nunito',sans-serif; color:#FAF3BC; background:#420600 url('img/background texture.png')repeat; }
6 Answers
Alex Heil
53,547 Pointsaditionally I just re-did the challenge and with the 2rules for background-color and background you won't pass the challenge as it will tell you that task3 stopped working - try to combine the values for background-color and background using the shorthand property as you correctly did in your very first code example - hope that helps ;)
Alex Heil
53,547 Pointshey satya, you're actually very close. have a look at your image - the name of it should be "texture.png" only but you tried the value "backgroundtexture.png" - hope that helps ;)
satya jr
3,351 PointsThanks for the reply Alex. I tried it texture.png,but it Still rejects my code I can see the tiled texture in the right side, which means my code is probably right. But I still get a BUMMER alert
/* My code */
body
{font-family:'Nunito',sans-serif;
color:#FAF3BC;
background-color:#420600;
background:url('texture.png')repeat; }
}
Here is the link to the challenge(4th assignment)
http://teamtreehouse.com/library/websites/build-a-simple-website/styling-content/fonts-and-colors-2
Alex Heil
53,547 Pointshey satya, is this the exact code you entered? then check again your pic value inside the url() - now you entered texture.png - which is the correct filename - but how about the img folder it's in? I guess you removed it by accident as it was avaiable in your first code example ;)
satya jr
3,351 PointsSorry I typed the code wrong here. Should have copied it. Even with img/texture.png it rejects my code
satya jr
3,351 PointsThanks a lot Alex! You are my hero
Alex Heil
53,547 Pointsyou're welcome ;) great to hear that you got it working!