New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give a Background Color to a Div Element - second test won't pass even though the div's background is silver #16473
Comments
Based on tutorial, you should name your class to |
Yes, the test checks if the class name is "silver-background" and then checks if it changes the background colour to silver. If you change the name of the class, it will flag an error. |
The tests are testing two things that are independent of each other. If the div is colored silver, the second test should pass regardless of whether or not the right class name is used. |
Your argument is correct. But on testing with various class names and colour combination, I believe that the test is checking both the things together and not as separate entities, which should be rectified. |
I can see that 2nd challenge dependent on the 1st challenge because It says Create a class called silver-background with the background-color of silver. And then Assign this class to your div element. So I think first it checks weather div element has class silver-background or not then it checks the color of that class. |
Just follow these steps to see for yourself why this error is occurring.
Observation:-
|
I'd like to take a shot at this one |
Challenge Name
Give a Background Color to a Div Element
Issue Description
If you give the div the wrong class name but the background color is correct, the second test ("Your div element should have a silver background.") should pass, but it doesn't.
Your Code
Screenshot
The text was updated successfully, but these errors were encountered: