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 CSS Basics (2014) Basic Layout Styling the "Wildlife" div with Background Properties

Task 1 is no longer passing

I'm doing the "styling the wildlife div with background properties" and when I get to the second task place the value no-repeat it says that the task 1 is no longer passing, I have tried many things but I don't understand what to do...

thanks

style.css
/* Complete the challenge by writing CSS below */
.wildlife {
  background-image: url("../img/bear.jpg") 
  background-repeat: no-repeat;
}
index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lake Tahoe</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body> 
        <div class="primary-content t-border">
            <p class="intro">
                Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
            </p>
            <a class="callout" href="#more">Find out more</a>
      <div class="wildlife" img="img/bear.jpg">
        <h2>Check out all the Wildlife</h2>
        <p>
          As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of <a href="#mink">mink</a>, <a href="#bears">bears</a>, and <a href="#eagles">bald eagles</a>.
        </p>
      </div><!-- End .wildlife -->
            <a class="callout" href="#wildlife">See the Wildlife</a>
        </div><!-- End .primary-content -->
  </body>
</html>

4 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Andres,

First, it looks like you changed the code you had that passed Task one, so that will need to be changed back. Second, that error is very misleading and always means that you have introduced a syntax error in the current Task you are working on, and not any previous task. So, don't click the Go To Task x button, as there is no error there. The error will be on the task you are working on. I know that's annoying, but is currently something that cannot be rectified.

Without seeing what happened when you first received that message, I can only guess. But in the above code, you are missing a semicolon to end the first statement in the CSS.

Once the code is put back to what passed task one originally, and you add the semicolon, everything else you have is correct.

/* Complete the challenge by writing CSS below */
.wildlife {
  background-image: url("img/bear.jpg");
  background-repeat: no-repeat;
}

Keep Coding! :) :dizzy:

The url can be good it's in his css file so if he have his css file in a special map he need to go out the map first.

it was not loading the background-repeat as a property was instead being dark-grey and the background image was green, i just reloaded a few times and now it worked because i was missing the semi colon, i am sorry guys i made you invest some time on a missing semicolon i just have since 5 am here at treehouse and think i need some sleep, i'm not seeing anything, i think im way too tired

excuse me

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

Hi Frans de Haan

I'm not saying it's wrong... I'm saying it's the incorrect url for this challenge. If you copy and paste his code into the challenge (adding the missing semicolon) it will receive the Bummer! with the error message

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'.

So, the URL in the answer is incorrect, as stated in my original response.

No problem, I like to help. I hope it's not 23:40 there like here in the Netherlands:P

/* Complete the challenge by writing CSS below */ .wildlife { background-image: url("../img/bear.jpg") ; background-repeat: no-repeat; }

you forgot the ; symbol after the image url

Jason Anders
Jason Anders
Treehouse Moderator 145,860 Points

and the URL is incorrect, as noted in my answer above.

thanks everyone

is 5:55 pm i am now 12 hours around :p