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

Rolf Willems
Rolf Willems
2,249 Points

Code Challange doesn't accept my code

Hi, im doint this course and i tried to (as the assignment said) 'Add a new attribute selector that will target the input element with the type attribute value text. Set the background color to lightyellow' and this is my css-code, but it doesn't accept it. Anyone who can help me? I would appreciate it!

Sincerely, Rolf

a[title] {
    color: darkred;

  input[type="text"] {
    background-color: lightyellow;
  }

2 Answers

Joe Mills
Joe Mills
18,617 Points

The challenge says to add a new selector, you have yours inside of the previous selector. You need to close the curly braces after color: darkred;. The code itself is correct

Rolf Willems
Rolf Willems
2,249 Points

thank you so much, that was it! I guess i have to take another course about de-bugging ;)

Laura Cressman
Laura Cressman
12,548 Points

Found the bug-you forgot to close your curly braces for the a[title] selector, so the new input selector was inside those curly braces. Does that help? Smile, Laura :)

Rolf Willems
Rolf Willems
2,249 Points

thank you so much, that was it! I guess i have to take another course about de-bugging ;)