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

css basics

on task 2 I keep getting a error that I didn't set the background-color to orange. The question states as follows: target main-header with class selector then add a background-color of orange. here is my code:

main-header {

background-color: orange; } It is asking for it to be under Styles.css. I am under the right file this time. I have copied and pasted several times. I can usually do that and it will eventually take it. It has not done it this time. I was positive that was the code for the background.

1 Answer

Houston Erekson
Houston Erekson
10,542 Points

Make sure you ad the class selector "." before the name of the class .main-header{ background-color: orange; }