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 Foundations Selectors Basic Attribute Selectors

Matt Buckingham
Matt Buckingham
4,419 Points

What's wrong with this code?

a{color:darkred} input{background-color:lightyellow;} .submit{color:white; background-color:steelblue;}

5 Answers

Ok, I see what's going on here. The challenge is not asking for you to target the classes, but attributes. In this case it's having you target what would contain the type attribute value of submit. In this case it would be an input element. I hope this helps.

input[type="submit"] {
  color:white;
  background-color:steelblue; 
}

You are missing the semi-colon (;) after color:darkred

a {
   color: darkred;
}

It looks like you're missing a semi-colon after darkred...

a {
     color: darkred;
}
Brian Goldstein
Brian Goldstein
19,419 Points

yup. syntax is important.

.class or #id element {
          attribute: value;
}```
Matt Buckingham
Matt Buckingham
4,419 Points

that did not work it is the .submit{color:white; background-color:steelblue;} part that needs to be fixed. here are the instructions Finally, add a new attribute selector that will target the submit button. Set the text color to white and the background color to steelblue and here is what it is saying Bummer! Please check your attribute selector, make sure background-color is set to 'steelblue'.