Tell us what’s happening:
I am failing test cases 41-53 even though I followed all the instructions from the user stories. The table visually appears to follow all instructions, but for some reason it still says I’m doing something wrong. I’m ensuring that I’m using the proper syntax within the stylesheet, but I am unsure what I am doing wrong here.
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>Book 1</td>
<td>Author 1</td>
<td>Action</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>Book 2</td>
<td>Author 2</td>
<td>Comedy</td>
<td><span class="status">In Progress</span></td>
<td>
<span class="rate two">
<span></span>
<span></span>
<span></span>
</span>
</td>
<tr class="to-read">
<td>Book 3</td>
<td>Author 3</td>
<td>Horror</td>
<td><span class="status">To Read</span></td>
<td>
<span class="rate three">
<span></span>
<span></span>
<span></span>
</span>
</td>
</tr>
</tbody>
</table>
</body>
</html>
/* file: styles.css */
* {
box-sizing: border-box;
}
tr[class="read"] {
background-image: linear-gradient(to right, green, yellow);
}
tr[class="in-progress"] {
background-image: linear-gradient(to right, brown, yellow);
}
tr[class="to-read"] {
background-image: linear-gradient(to right, red, yellow);
}
span {
display: inline-block;
}
tr[class="to-read"] span[class="status"] {
border: 1px solid black;
background-image: linear-gradient(to right, red, yellow);
}
tr[class="read"] span[class="status"] {
border: 1px solid black;
background-image: linear-gradient(to right, green, yellow);
}
tr[class="in-progress"] span[class="status"] {
border: 1px solid black;
background-image: linear-gradient(to right, brown, yellow);
}
span[class="status"], span[class^="rate"] {
width: 100px;
height: 50px;
padding: 10px;
}
span[class^="rate"] span {
border: 1px solid black;
border-radius: 50%;
margin: .1rem;
height: 20px;
width: 20px;
background-color: white;
}
span[class$="one"] span:first-child {
background-image: linear-gradient(to right, blue, red);
}
span[class$="two"] span:first-child, span[class$="two"] span:nth-child(2) {
background-image: linear-gradient(to right, blue, red);
}
span[class$="three"] span {
background-image: linear-gradient(to right, blue, red);
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App