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 Basic Selectors ID and Class Selectors

Walker Boggess
Walker Boggess
2,354 Points

In the style sheet, target main-header with a class selector. Then, add a background-color property and

i cant set the color to orange for some reason

index.html
<header class="main-header">
  <div>
    <h1>Developer Diane: Resume</h1>
    <address>
      <p>website: developerdiane.com</p>
      <p>email: diane@developerdiane.com</p>
    </address>
    <img src="developer-diane.jpg" alt="Developer Diane coding on her laptop.">
  </div>
</header>
style.css
/* Complete the challenge by writing CSS below */
.main-header {
  background-color: orange;
}
Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

I don't see any issues with the code you've provided here. I would maybe try starting over with the Restart button. It's possible something else in the HTML that wasn't shared here was altered a bit and it's throwing the tests off, but I'm not positive.

I just tried the challenge with what you've written and it passed for me.

1 Answer

Steven Parker
Steven Parker
243,266 Points

I reproduced the same error using the code above, but there's nothing wrong with the CSS code.

The issue is that the originally provided HTML code was 40 lines, and most of it seems to be missing now. Part of that missing code had links to two external stylesheets.

Start over, and be careful to do only what the instructions ask for.

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

My apologies, I assumed he just copy/pasted that header element and the rest was still there. Absolutely what Steven said!