Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

Code won’t pass saying i need to create a selector for span with class status and another with value rate. I cannot find the error.

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>
</th>
<tbody>
<tr class="read">
  <td></td>
  <td></td>
  <td></td>
  <td><span class="status">Read</span></td>
  <td><span class="rate one"><span></span><span></span><span></span></span></td>
</tr>
<tr class="in-progress">
  <td></td>
  <td></td>
  <td></td>
  <td><span class="status">In Progress</span></td>
  <td><span class="rate"><span></span><span></span><span></span></span></td>
</tr>
<tr class="to-read">
  <td></td>
  <td></td>
  <td></td>
   <td><span class="status">To Read</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(to right, pink, purple);
}
tr[class="to-read"]{
background-image: linear-gradient(to right, pink, purple);
}
tr[class="in-progress"]{
  background-image: linear-gradient(to right, pink, purple);
}
span{
  display: inline-block;
}
tr[class="to-read"] span[class="status"] {
border: 1px;
background-image: url("https://www.google.com/imgres?q=lara%20taveirne%20wolf&imgurl=https%3A%2F%2Fcdn.standaardboekhandel.be%2Fproduct%2F9789044654219%2Ffront-medium-2273805059.jpg&imgrefurl=https%3A%2F%2Fwww.standaardboekhandel.be%2Fp%2Fwolf-9789044654219&docid=TkIwV9ulK2uP2M&tbnid=qbCBlLk5V6DHvM&vet=12ahUKEwjd4aDX782VAxUVQvEDHQQ3AkwQnPAOegQILhAA..i&w=500&h=807&hcb=2&ved=2ahUKEwjd4aDX782VAxUVQvEDHQQ3AkwQnPAOegQILhAA$0");
}
tr[class="read"] span[class="status"]{
  border: 1px;
  background-image: url("https://www.google.com/imgres?q=the%20dark%20heroine&imgurl=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F81q6C-uBOXL._UF1000%2C1000_QL80_.jpg&imgrefurl=https%3A%2F%2Fwww.amazon.com%2FDark-Heroine-Dinner-Vampire-ebook%2Fdp%2FB0095I7UEC&docid=xXv5gKt5ab__PM&tbnid=V_lXC8RlZ9miTM&vet=12ahUKEwjt0vuG8M2VAxXrA9sEHWcuJlcQnPAOegQILBAA..i&w=664&h=1000&hcb=2&ved=2ahUKEwjt0vuG8M2VAxXrA9sEHWcuJlcQnPAOegQILBAA$0");
}
tr[class="in-progress"] span[class="status"]{
  border: 1px;
  background-image: url("https://www.google.com/imgres?q=kerkhofblommenstraat&imgurl=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FS%2Fcompressed.photo.goodreads.com%2Fbooks%2F1539720194i%2F42371061.jpg&imgrefurl=https%3A%2F%2Fwww.goodreads.com%2Fbook%2Fshow%2F42371061-kerkhofblommenstraat&docid=GBl19pPH6i4VBM&tbnid=TvtBz0-La6sqFM&vet=12ahUKEwiQ6amp8M2VAxUFOnoKHQXtBJEQnPAOegQINhAA..i&w=243&h=400&hcb=2&ved=2ahUKEwiQ6amp8M2VAxUFOnoKHQXtBJEQnPAOegQINhAA$0");
}
span[class="status"], span[class="rate"]{
  width: 200px;
  height: 200px;
  padding: 5px;
}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15

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

Hey @chaosAngel666,

  1. You should use an attribute selector to target the span elements with the class of status and the span elements with the class value starting with rate and set their height, width, and padding properties.

User story instructs you to target span elements with the class value starting with rate, but I don’t see that happening in below code:

I would recommend you to checkout What Is the Attribute Selector, and How Can It Be Used to Target Links with the href and title Attributes? once again and then retry solving the problem.

Happy coding~

hi! i tried that first a couple of times and just did so again and also doesnt work

Read carefully what I am trying to say. Order of the selector does not matter over here. What matters is whether you are following the instructions carefully or not.

I’ll drop another hint for you.

You have to deal with “begins with” attribute selector for rate.

Hi! I’m sorry i added the wrong screenshot! I tried the one that is listed as “starts with” from the course, actually i tried all options and none of them pass… (i added all the screenshots just in case). Thanks for your quick replies btw! Really appreciate it.

Check the following user story:

  1. You should use an attribute selector to target the span elements which are direct children of span elements with the class value starting with rate and set their border, border-radius, margin, height, width, and background-color properties.

Now you are supposed to target direct children of span elements with the class value starting with rate and set following properties:

border, border-radius, margin, height, width, and background-color

Try this and let us know if any problem arises.

Thanks so much! I finished the project.