Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

I’ve done steps 50 and 51 a thousand ways, and it just won’t let me. I always get an error. Who can help me? I’m stuck.

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>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>Book 1</td>
        <td>Author 1</td>
        <td>Fiction</td>
        <td><span class="status">Read</span></td>
        <td>
          <span class="rate one"><span></span><span></span><span></span></span>
        </td>
      </tr>
      <tr class="to-read">
        <td>Book 2</td>
        <td>Author 2</td>
        <td>Non-fiction</td>
        <td><span class="status">To Read</span></td>
        <td>
          <span class="rate two"><span></span><span></span><span></span></span>
        </td>
      </tr>
      <tr class="in-progress">
        <td>Book 3</td>
        <td>Author 3</td>
        <td>Biography</td>
        <td><span class="status">In Progress</span></td>
        <td>
          <span class="rate three"><span></span><span></span><span></span></span>
        </td>
      </tr>
      <tr class="read">
        <td>Book 4</td>
        <td>Author 4</td>
        <td>Science Fiction</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 */
tr[class="read"] {
  background-image: linear-gradient(#13afb7 30%, #13afb7 20%);
}

tr[class="to-read"] {
  background-image: linear-gradient(#9cf5fb 30%, #9cf5fb 20%);
}

tr[class="in-progress"] {
  background-image: linear-gradient(#5ecbd2 30%, #6fb5ba 20%);
}


span {
  display: inline-block;
}


tr[class="to-read"] span[class="status"] {
  border: 2px solid #1d91f7;
  background-image: linear-gradient(#1d91f7 30%, #1decf7 20%);
}

tr[class="read"] span[class="status"] {
  border: 2px solid red;
  background-image: linear-gradient(#7c9597 30%, #7e8b8b 20%);
}

tr[class="in-progress"] span[class="status"] {
  border: 2px double yellow;
  background-image: linear-gradient(#7c9597 30%, #7e8b8b 20%);
}


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


span[class^="rate"] > span {
  border: 2px solid #fff;
  border-radius: 2px;
  margin: 2px;
  height: 10px;
  width: 10px;
  background-color: #fe0;
}


span[class~="one"] > span:nth-child(1) {
  background-image: linear-gradient(#232323 70%, #345667 30%);
}


span[class~="two"] > span:nth-child(1),
span[class~="two"] > span:nth-child(2) {
  background-image: linear-gradient(#232323 30%, #345667 30%);
}

span[class*="three"] > span {
  background-image: linear-gradient(#232323 10%, #345667 30%);
}

Your browser information:

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

Challenge Information:

Build a Book Inventory App - Build a Book Inventory App

Hi,
You might wanna change this little star here to something else: span[class*="three"]. The lines above this could help you find the solution.
Good luck!

2 Likes

Thanks!!! it already worked