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

lyonel scapino
lyonel scapino
14,191 Points

CSS state elements pseudo classes

I am trying to color in lightgray the disabled input text field on the form. The editor actually shows that the code does exactly that, still the challenge is not accepted. Someone can help please?

Input[type=”text”]:disabled{ background-color:lightgray; }

5 Answers

I was able to get this to work on the challenge using your code but deleting the quotes around "text" in the attribute selector.

before: input[type=”text”]:disabled{ background-color:lightgray; } after: input[type="text"]:disabled{ background-color:lightgray; }

Maybe you copy/pasted from somewhere and picked up some unwanted styling around the characters?

lyonel scapino
lyonel scapino
14,191 Points

looks like it had something to do with quotes indeed. thanks...:)

Glad I could help :)

Tom Mertz
Tom Mertz
15,254 Points

Did you mean to capitalize input in that statement?

Tom Mertz
Tom Mertz
15,254 Points

Only other thoughts besides that is try just background, maybe.

lyonel scapino
lyonel scapino
14,191 Points

tried both, still refusing. thanks.

Tom Mertz
Tom Mertz
15,254 Points

Well, if it's not that particular line, maybe you missed a curly bracket some place else that is messing it up? Is this a challenge that you could link?

lyonel scapino
lyonel scapino
14,191 Points

these are very short css challenges, it s not like you re writing an entire page of code. thanks, Michael put me on the right track.