Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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; }