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

Tell us what’s happening:
Describe your issue in detail here.
there is some kind of bug because my code is not working

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Balance Sheet</title>
  <link rel="stylesheet" href="./styles.css">
</head>
<body>
  <main>
    <section>
      <h1>
        <span class="flex">
          <span>AcmeWidgetCorp</span>
          <span>Balance Sheet</span>
        </span>
      </h1>
      <div id="years" aria-hidden="true">
        <span class="year">2019</span>
        <span class="year">2020</span>
        <span class="year">2021</span>
      </div>
      <div class="table-wrap">
        <table>
          <caption>Assets</caption>
          <thead>
            <tr>
              <td></td>
              <th><span class="sr-only year">2019</span></th>
            <th><span class="sr-only year">2020</span></th>
            <th><span class="current">2021</span></th>
            </tr>
          </thead>
          <tbody>
          </tbody>
        </table>
        <table>
        </table>
        <table>
        </table>
      </div>
    </section>
  </main>
</body>
</html>
/* file: styles.css */

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn More About CSS Pseudo Selectors By Building A Balance Sheet - Step 11

Link to the challenge:

Hi @sparshbhardwaj,

The current class is applied on the wront element. Try reading the question closely :slight_smile:

Hope that helps

Mod edit: solution code removed

Hello and welcome to the forums!

I noticed that you are new to this forum and that you have kindly attempted to help a few campers by providing them with solutions for the FCC challenges.

There are many learners on the forum who are attempting to learn to code and for them to do well and absorb the process of writing and debugging code, they need to use the forum to get advice/hints/tips to help them reach their full learning potential. Based on known studies though, learners will only be hampered if they are prevented from forming their own conclusions (by the sharing of full code solutions). And ultimately this may cause them to fail to become standalone programmers.

Given this, the posted solutions have been removed and we kindly ask you to refrain from posting solutions to the forum in future.

Thank you for your understanding and support.

will you please explain in detail because I have seen it closely but it’s still not working

You are almost there.
Recall the instructions want you to give each th element the class sr-only and the class year.
(Each means all)

It doesn’t seem you have done that for all the th elements.

Sorry for it. I was thinking that i can post the solutions and assuming it’s allowed on the platform. I’ll take care of that from now.

1 Like

You’ve set the span class to current, it wants the th class to be set.

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