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 trialCathy Zoulek
19,989 PointsCode Challenge: More Pseudo-classes - task 3
I'm trying to complete the code challenge for More Pseudo-classes. Task 3 asks "The 'Phone' field in this form has been disabled in the HTML file. Create a new rule that selects the disabled field only, then set its background color to lightgray."
I have it set as
:disabled { background-color: #CCC; }
It shows up correctly on the sample form but it keeps telling me to check my selector. Any idea what I am missing?
5 Answers
James Barnett
39,199 Points@Cathy -
That question is actually asking for the color keyword lightgray
, not a hex code color.
James Barnett
39,199 PointsAn interesting tidbit is that, the color keyword light gray is defined as the hex code #d3d3d3
.
Cathy Zoulek
19,989 Points@James - Thank you! That was it.
James Barnett
39,199 Points@Cathy - You're quite welcome.
Stefan Kragh
1,478 PointsI got stuck on this for the longest because of the same color code problem. #CCC is used by the instructor in the lesson leading up to the challenge, and then called "light gray". Fwiw, I ended up with a solution I thought was more specific to the disabled "Phone" field. Here goes:
input[type="text"]:disabled {
background-color: lightgray;
}
Edit: Ok so "text" in the code posted here is red now. That has me worried.