Build a Book Inventory App - Build a Book Inventory App

Tell us what’s happening:

I have been stuck on step 48 for quite a while and i dont know how to solve it.

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>
  <th>Title</th>
  <th>Author</th>
  <th>Category</th>
  <th>Status</th>
  <th>Rate</th>
  </thead>

  <tbody>

    <tr class="read" align="center">
      <td>Ger</td>
      <td>Ger</td>
      <td>Ger</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" align="center">
      <td>Ger</td>
      <td>Ger</td>
      <td>Ger</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" align="center">
      <td>Ger</td>
      <td>Ger</td>
      <td>Ger</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 */
body{
  background-color: grey
}

tr[class=read]{
  background-image: linear-gradient(lightgreen 50%, green 80%);
}

tr[class=to-read]{
  background-image: linear-gradient(red 50%, teal 80%);
}

tr[class=in-progress]{
  background-image: linear-gradient(yellow 50%, white 80%);
}

span{
  display: inline-block;
}

tr[class=to-read] span[class=status]{
  border: 2px solid darkred;
  border-radius: 10px;
  background-image: linear-gradient(blue 50%, purple 80%)
}

tr[class=read] span[class=status]{
  border: 2px solid darkgreen;
  border-radius: 10px;
  background-image: linear-gradient(yellow 10%, white 90%);
}

tr[in-progress] span[class=status]{
  border: 2px solid black;
}

tr[class=in-progress] span[class=status]{
  border: 2px solid black;
  border-radius: 10px;
  background-image: linear-gradient(pink 50%, red 80%)
}

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

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

span[class~=one] > span:first-of-type{
  background-image: linear-gradient(white);
}

span[class~=two] span:nth-of-type(1)
span[class~=two] span:nth-of-type(2){

}




Your browser information:

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

Challenge Information:

Build a Book Inventory App - Build a Book Inventory App

what is this step 48 you ask about? can you tell us some more about it?

You should have an attribute selector to target the first two descendants of span elements that have the word two as a part of their class value. Specificly this step. The last code in my css sheet is how i tried solving it.

you should review how to use multiple selectors separately in the same selector

span[class~=two] span:nth-of-type(1)
span[class~=two] span:nth-of-type(2)

a selector like this means that span:nth-of-type(2) is a descendant of
span[class~=two] which is a descendant of span:nth-of-type(2) which is a descendant of span[class~=two]

which I am sure is not what you want