Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 44

Technical problem with code testing
I’ve been trying to crossover the step for a quite a while now with no success. I’ve tried various solutions including referencing from youtube as well as the code in the next step, all without any progress.

The question reads as follows:
Style the text within your #years element by creating a #years span[class] selector. The span[class] syntax will target any span element that has a class attribute set, regardless of the attribute’s value.

Give your new selector a bold font, a width of 4.5rem, and text aligned to the right.

My code is as follows

#years span[class] {
  font-weight: bold;
  width: 4.5rem;
  text-align: right;
}

The error displayed is:
Sorry, your code does not pass. Keep trying.
You should have a #years span[class] selector.

Any guidance will be appreciated.

Challenge Information:

Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 44

Hello @kelwgra17!

It appears the code is correct.

A few things to check is if there are any missing curly brackets, from the code above or the code below this code.

Otherwise, it may be a good idea to try the following!

  • Reset step
  • Refresh page (F5)
  • Some browser extensions, such as ad-blockers and dark mode extensions can interfere with the tests.
  • If you are having problems, recommendation is to disable extensions that modify the content or layout of pages, while taking the course.
    • Try a different browser.

Keep up the good progress.

2 Likes

Hey
Your code looks OK,try reseting it and try again.

1 Like

Hello!

If you are still having difficulties submitting the code, after completing my above suggestions:

Please use the Help, that appears after three unsuccessful attempts at any lesson in Responsive Web Design, to submit all code for both the html and the css, along with your question?

This will allow us to guide you to resolve your issue with this problem in a quick, direct and accurate, way.

Happy coding!

1 Like

I followed the steps provided and it worked. Thankyou

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.