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

Bug? CSS Basics / Width and Height Properties / 1st Challenge Task 2/5

Hello, I think I found a bug in the CSS Basics / Width and Height Properties / 1st Challenge Task 2/5.

The task is: Next, define the background property and value that prevents a background image from repeating in any direction.

.wildlife {
background-image: url('img/bear.jpg')
background-repeat: no-repeat;
}

But when I try to submit it, I get this error message:

Bummer: Since the style sheet is not in a separate folder, make sure you're using 'url()' to set the background image value to 'img/bear.jpg'.

First of all, I'm not sure it is a relevant error message, because the first task was to set the background-image and it already accepted it. So I don't understand why it is want to correct it in the second task. But as you can see I have my code the say it says in the error message, but still can't submit it, because I get this error again and again.

Can you help me please, how to solve this problem? I'm stuck at this point, but I want to continue my studies.

Here is a link for the challenge: click here

Best wishes, Bence

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Bence Mészáros! No, it's not a bug. And this is not specific to Treehouse or code challenges. If a CSS selector only has one rule, you can generally omit the semicolon at the end. However, if the CSS selector contains more than one rule, each rule must have a semicolon.

In short, you didn't really end the background-image rule because it is missing a semicolon so it can't make it down to your next rule. Adding a semicolon to the end of background-image: url('img/bear.jpg') should cause it to pass the next step :smiley:

Hope this helps! :sparkles:

Oh no! OH NO! You are right! How could I miss that... Oh my gosh...

Thank you for your help!