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 Selectors Type Selectors

How do I correctly create a new type selector that targets the div element with a lightblue background color??

I seriously am stumped here. This is my answer so far

div { background-color: lightblue; }

style.css
/* Complete the challenge by writing CSS below */
div { background-color: lightblue; }
index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Lake Tahoe</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body> 
    <header>
      <span>Journey through the Sierra Nevada Mountains</span>
      <h1>Lake Tahoe, California</h1>
    </header>
    <p>
      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 href="#">Find out more</a>
    <div>
      <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 mink, bears, and Bald eagles.
      </p>
      <a href="#">See the Wildlife</a>
    <div>
  </body>
</html>

Does your current implementation not work for you? It does for me, even while leaving your <div> tag unclosed. Make sure your css files are in the root directory with your index.html file.

@scottreeves I actually had it in the wrong placement the entire time, I was placing that line of code in the middle of the other code I had, so the sequence was off. Thanks so much for your input!!

Steven Parker
Steven Parker
229,657 Points

Scott, that "div" end tag is a bug in the provided challenge code. You might want to report that to Support, you may even get an "exterminator" badge. :beetle:

1 Answer

Steven Parker
Steven Parker
229,657 Points

That code looks good, but where is all the rest of the code that you must have done for the other tasks?

The instructions say: " Important: In each task of this code challenge, the code you write should be added to the code from the previous task."

Yes sir, that was my exact issue. I didn't have the rest of the code along with it. It only took me 40 minutes to find out, ha.