Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

i need help cuz my last 5 codes doesnt work and theres no way to know what wrong with them, need help with one and i can tale care of the rest, that one says
" 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."

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></td>
      <td></td>
      <td></td>
      <td><span class="status">Read</span></td>
      <td><span class="rate two"><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 three"><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 two"><span></span><span></span><span></span></span></td>
     </tr>
     <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>
   </tbody>
   </table>
 
</body>

</html>
/* file: styles.css */
tr[class=read] {
  background-image: linear-gradient(to left, orange, green);
}

tr[class=to-read] {
  background-image: linear-gradient( to right, lightblue, pink);
}

tr[class=in-progress] {
  background-image: linear-gradient(to right, blue, green);
}

tr[class=to-read] span[class=status] {
  display: inline-block;
  border: 2px solid gray;
  background-image: linear-gradient(to left, yellow, black);
}

tr[class=read] span[class=status] {
  border: 2px solid gray;
    display: inline-block;
  background-image: linear-gradient(to left, purple, gray);
}

tr[class=in-progress] span[class=status] {
  border: 2px solid gray;
    display: inline-block;
  background-image: linear-gradient(to right, yellow, red);
}

span[class=status], span[class^=rate] {
  height: 20px;
    display: inline-block;
  width: 40px;
  padding: 0;
}

span[class^=rate] > span {
  border: 2px solid gray;
  border-radius: 5px;
  margin: 0;
  height: 20px;
  width: 40px;
  background-color: yellow;
    display: inline-block;
}

span[class*="one"] span:first-child {
    display: inline-block;
  background-image: linear-gradient(to right, orange, yellow);
}

span[class*="two"] span:nth-child(-n+2) {
    display: inline-block;
  background-image: linear-gradient(to right, orange, yellow);
}


Your browser information:

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

Challenge Information:

Build a Book Inventory App - Build a Book Inventory App

MDN: Attribute Selectors

This is a good reference for attribute selectors.

1 Like

thanks i will use it

i solved the num 48

removed by moderator

Congrats on figuring it out, but I’ve removed your solution, so it doesn’t spoil it for others.

i put it cuz that`s was only no solution existent and already no one here or any other place replied on, why ?

it is not allowed to share solutions on the forum

i hope no one get stuck with it cuz it took me all that time since i shared it till i solved it to figure out the solution

and thatnks for sharing me that info

you can always ask on the forum, and ask all your questions, and also all the questions you get after you receive help, you don’t need to be stuck alone

1 Like

thanks really for your support