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 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'.