Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

Task No. 46-51 are very confusing. i’m unable to figure out the error in my code

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>The Pragmatic Programmer</td>
        <td>Andrew Hunt</td>
        <td>Programming</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>Clean Code</td>
        <td>Robert C. Martin</td>
        <td>Programming</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>Designing Interfaces</td>
        <td>Jenifer Tidwell</td>
        <td>UX Design</td>
        <td><span class="status">In Progress</span></td>
        <td><span class="rate"><span></span><span></span><span></span></span></td>
      </tr>
      <tr class="read">
        <td>Don't Make Me Think</td>
        <td>Steve Krug</td>
        <td>UX Design</td>
        <td><span class="status">Read</span></td>
        <td><span class="rate one"><span></span><span></span><span></span></span></td>
      </tr>
    </tbody>
  </table>
</body>
</html>

/* file: styles.css */
span {
  display: inline-block;
}

tr[class="read"] {
  background-image: linear-gradient(to right, #d1e8ff, #a0c4ff);
}

tr[class="to-read"] {
  background-image: linear-gradient(to right, #fff3cd, #ffeeba);
}

tr[class="in-progress"] {
  background-image: linear-gradient(to right, #e2f0cb, #cdeac0);
}

tr[class="to-read"] span[class="status"] {
  border: 1px solid #f0ad4e;
  background-image: linear-gradient(to right, #fdf6e3, #fceabb);
}

tr[class="read"] span[class="status"] {
  border: 1px solid #5cb85c;
  background-image: linear-gradient(to right, #dff0d8, #c8e6c9);
}

tr[class="in-progress"] span[class="status"] {
  border: 1px solid #5bc0de;
  background-image: linear-gradient(to right, #d9edf7, #b3e5fc);
}

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

span[class^="rate"] > span {
  border: 1px solid #ccc;
  border-radius: 50%;
  margin: 2px;
  height: 10px;
  width: 10px;
  background-color: #eee;
}

span[class*="one"] > span:first-child {
  background-image: linear-gradient(to right, #ffcccb, #ff9999);
}

span[class*="two"] > span:nth-child(-n+2) {
  background-image: linear-gradient(to right, #ffd700, #ffec8b);
}

span[class*="three"] > span {
  background-image: linear-gradient(to right, #90ee90, #32cd32);
}

Your browser information:

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

Challenge Information:

Build a Book Inventory App - Build a Book Inventory App
https://www.freecodecamp.org/learn/full-stack-developer/lab-book-inventory-app/build-a-book-inventory-app

happy coding :slight_smile:

compared the codes no luck

You should not have compared, you needed to read

*= would accept also a class like “someone” but you should apply the styling only if the class is “one”