CSS Pseudo Selectors - Step 11

Hello, I can’t get past this step. Can someone help me and tell me what I’m doing wrong? Thanks in advance.

Step 11

Within each of your new th elements, nest a span element with the class set to sr-only year. Give them the following text (in order): 2019, 2020, and 2021.

Give your third th element the class attribute set to current.

Leave the td element empty. This element exists only to ensure your table has a four-column layout and associate the headers with the correct columns.

/* file: index.html */
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Balance Sheet</title>
  <link rel="stylesheet" type="text/css" 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/102.0.5005.62 Safari/537.36

Challenge: Step 11

Link to the challenge:

Hello @natalitomeeduardo.

Look at your code and read the instructions I quoted. One of them instructs you add class attributes to the <span> elements you made and the other does not.

Hope you understand what I said…

2 Likes

Thank you so much!! I’m going to look at it again :slight_smile:

1 Like

I was stuck on the same step. I solve it just reading again, that the “current” class is for third th, “sr-only” class just for the spans in the th. See <3

     <thead>
              <tr>
                <td></td>
                <th><span class="sr-only year">2019</span></th>
                <th><span class="sr-only year">2020</span></th>
                <th class="current"><span class="sr-only year">2021</span></th>
               
              </tr>
            </thead>
8 Likes

I was stuck on this too thanks a lot!

1 Like

thanks i was stuck tooo

Thanks, this was a perfect hint!

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