Tell us what’s happening:
Test 21(you should use an attribute selector to target rows that have a class of read, to-read) cannot be completed. please check my code;
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>
<link rel="stylesheet" href="styles.css">
<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>The Three Musketeers</td>
<td> Alexandre Dumas </td>
<td>Historical Novel</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">
<td>The Plague</td>
<td>Albert Camus</td>
<td>Philosophical Novel</td>
<td><span class="status">To Read</span></td>
<td><span class="rate"><span></span><span></span><span></span></span></td>
</tr>
<tr class="read">
<td>The Metamorphosis</td>
<td>Franz Kafka</td>
<td>Novella</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(orange, yellow);
}
tr[class="to-read"] {
background-image: linear-gradient(papayawhip, yellow);
}
span {
display: inline-block;
}
tr[class="to-read"] span[class="status"] {
border: 2px solid red;
background-image: linear-gradient(pink 10%, red 90%);
border-radius: 40%;
}
tr[class="in-progress"] span[class="status"] {
border: 2px solid red;
background-image: linear-gradient(pink 10%, red 90%);
border-radius: 40%;
}
span[class="status"] {
height: 2.5rem;
width: 5rem;
padding: 5px;
}
span[class="rate"] {
height: 2.5rem;
width: 5rem;
padding: 5px;
}
span[class="rate"] > span {
border: 2px solid red;
border-radius: 50%;
margin: 4px;
height: 30px;
width: 30px;
background-color: lightgreen;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App