Code validation: bug or what? ;-)

Hi guys,

Hope you are well.

Sorry if this is not the place to post this question but I couldn't find 
anywhere else to ask.

I'm following an online course on Coursera and I use your tool to 
validate HTML and CSS code before submitting tests for course grading.

I have the following css code that doesn't pass validation although all 
the documentation I checked on many different sites says the syntax is good.

#link {
   background-color: green;
   padding: 5px;
   text-align: center;
   text-decoration: none;
   position: fixed;
   top: 0;
   left: 50%;
   a {
     color: white;
   }
}

When I try to validate this code for a div selector, the validator lists 
an error on line 11. I narrowed it to the a { color: white; } but don't 
understand what's wrong. Is it a bug or am I doing something wrong? The 
code still shows perfect with the corresponding HTML file on a web page.

Thank you for your time and help.

Regards,

Bernard.

Received on Thursday, 22 May 2025 08:18:15 UTC