Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

I’m REEEALLY stuck in 48. You should have an attribute selector to target the first descendant of span elements that have the word one as a part of their class value. I’ve tried lots of combinations:

span[class*=“one”] span:nth-of-type(1),

span[class*=“one”] span:first-of-type,

span[class*=“one”] :first-child,

span[class=“one”] span:first-child,

span[class*=“one”]:first-child,

span[class*=“one”] > :first-child,

span[class*=“one”] :first-child

… but nothing. help pls?

(just pls ignore the goofy colors i chose XD)

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>  
  <meta charset="utf-8">
  <title>Book Inventory</title>
  <link rel="stylesheet" href="styles.css">
</head>

<body>
  <h1>Book Inventory</h1>
  <table>
    <thead>
      <tr>
        <th>Title</th>
        <th>Author</th>
        <th>Category</th>
        <th>Status</th>
        <th>Rate</th>
      </tr>
    </thead>
    <tbody>
      <tr class="read">
        <td>Gold for Thanksgiving</td>
        <td>Swiss Ninja</td>
        <td>Action/Comedy</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate three">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="read">
        <td>An Absurd Mission</td>
        <td>Austin8310</td>
        <td>Action/Comedy</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate three">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="read">
        <td>Kidnapped!</td>
        <td>Swiss Ninja</td>
        <td>Action/Comedy</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate three">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="read">
        <td>EPF Agents: Dave and Clovis</td>
        <td>Swiss Ninja</td>
        <td>Action/Comedy/Sci-Fi</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate three">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="read">
        <td>EPF Agents: The Rogue State</td>
        <td>Swiss Ninja</td>
        <td>Action/Romance</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate three">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="to-read">
        <td>Gottfriedt's Tale</td>
        <td>Swiss Ninja</td>
        <td>Romance</td>
        <td><span class="status">To Read</span></td>
        <td>
          <span class="rate">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>

      <tr class="in-progress">
        <td>Snoss Civil War</td>
        <td>Swiss Ninja</td>
        <td>Drama/Sci-Fi/Romance</td>
        <td><span class="status">In Progress</span></td>
        <td>
          <span class="rate">
            <span></span>
            <span></span>
            <span></span>
          </span>
        </td>
      </tr>
    </tbody>
  </table>
</body>

</html>
/* file: styles.css */
tr[class="read"] {
  background-image: linear-gradient(0deg,rgba(255, 187, 0, 1) 1%, rgba(51, 255, 0, 1) 94%);
}

tr[class="to-read"] {
  background-image: linear-gradient(0deg,rgba(224, 148, 25, 1) 1%, rgba(255, 25, 0, 1) 94%);
}

tr[class="in-progress"] {
  background-image: linear-gradient(0deg,rgba(255, 191, 0, 1) 4%, rgba(0, 47, 255, 1) 98%);
}

span {
  display: inline-block;
}

tr[class="to-read"] span[class="status"] {
  border: 2px solid black;
  background-image: linear-gradient(0deg,rgba(34, 0, 255, 1) 4%, rgba(255, 25, 0, 1) 98%);
}

tr[class="read"] span[class="status"] {
  border: 2px solid black;
  background-image: linear-gradient(0deg,rgba(34, 0, 255, 1) 4%, rgba(251, 255, 0, 1) 98%);
}

tr[class="in-progress"] span[class="status"] {
  border: 2px solid black;
  background-image: linear-gradient(0deg,rgba(4, 255, 0, 1) 4%, rgba(251, 255, 0, 1) 98%);
}

span[class="status"], span[class^="rate"] {
  height: 20px;
  width: 20px;
  padding: 10px;
}

span[class^="rate"] > span {
  border: 2px solid black;
  border-radius: 50px;
  margin: 5px;
  height: 10px;
  width: 10px;
  background-color: yellow;
}

span[class*="one"] span:nth-of-type(1){
  background-image: linear-gradient(0deg,rgba(255, 191, 0, 1) 4%, rgba(0, 47, 255, 1) 98%);
}

Your browser information:

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

Challenge Information:

Build a Book Inventory App - Build a Book Inventory App

Github Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-book-inventory-app/66a207974c806a19d6607073.md at main · freeCodeCamp/freeCodeCamp · GitHub

Oh, and i also tried :first-of-type in these combinations.

hello @HiImSheriff welcome to the forum!

the *= selector also selects the span element even if it has a class=”anyone”, which is not desired.