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 trialAaron Goldman
5,051 Pointsattribute selector quiz
I am stuck on the question: Add a new attribute selector that will target the input element with the type attribute value 'text'. Set the background color to 'lightyellow'.
here's what I have done:
input [type="text"] {
background-color: lightyellow;
}
it says: Bummer! Please check your attribute selector, make sure background-color is set to 'lightyellow'.
7 Answers
Chase Lee
29,275 PointsAaron Goldman take out the space between the t
and [
right here:
input [type="text"]
It should look like this:
input[type="text"]
Zack Goulet
2,115 Pointsvery good to know
Carolyn Lambert
8,350 Pointsworked for me!!!
sergio verdeza
Courses Plus Student 10,765 PointsGreat answer!!
Kevin Brunt
1,763 PointsThanks a lot. That space got me too. Great answer thanks everyone.
Charles Steinmetz
14,420 PointsThank you!!
loannlam
Courses Plus Student 2,582 PointsI input the answer that way but still not working. had to relaunch the window several times...
Igor Prymak
13,590 PointsI had same problem because I tried to write it in one line: input[type="text"] {background-color: lightyellow} You should split it into 3 lines, then it'll work.
Aaron Goldman
5,051 PointsAaron Goldman
5,051 PointsThanks Chase. That did the trick... hard to believe that one little "space" was tripping me up. now I know!
Aaron
James Barnett
39,199 PointsJames Barnett
39,199 Points@aaron goldman - Remember that spaces are syntactically significant in CSS selectors because spaces in a CSS selector means a descendant selector.