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

CSS Build a Simple Website Styling Content Fonts and Colors

Derek Zinger
Derek Zinger
3,337 Points

Endless loop of errors

Got stuck on some details of CSS code and opened a new tab to check the original video. That set off an endless loop of "It looks like Task 3 isn't passing" followed by "Be sure to add the image path after 'url()'". The image path is there and correct as far as I can tell. How do I get out of trhis loop?

7 Answers

Callum King
Callum King
6,470 Points

Does your css look like this?

body {
    font-family: 'Nunito' sans-serif;
    color: #FAF3BC;
    background: #420600 url(img/texture.png) repeat;
}
Derek Zinger
Derek Zinger
3,337 Points

Ah! It's "background", rather than "background-color"! I assume when you add the image you need to remove the "-color" from the property. Thanks for the help, Callum.

Didn't 'img-texture.png' have single quotation marks around it in the video? It seems to work without them, as well. Are they necessary?

Callum King
Callum King
6,470 Points

You could of added the background color with just using the background property instead of background-color property.

I'm not an expert on CSS (still learning), but I know you can get away without using them.

Derek Zinger
Derek Zinger
3,337 Points

So "background" covers both color and text? Good to know! Thanks again for the kindness, Callum.

Derek Zinger
Derek Zinger
3,337 Points

Very nice. Also very useful to know that when using the shorthand property, the attributes need to be placed in a certain order: color, image, repeat, attachment, position.

Callum King
Callum King
6,470 Points

All shorthand properties have a certain order, it's not just the background property that has a shorthand way of doing things. You'll bump into them as you go along, though it is a struggle to remember the order!