Tell us what’s happening:
I cannot get this to work. I’ve tried using the hints that are there already, to no avail.
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 class="title">Title</th>
<th class="author">Author</th>
<th class="category">Category</th>
<th class="status">Status</th>
<th class="rate">Rate<span></span><span></span><span></span></th>
</thead>
<tbody>
<tr class="to-read">
<td>Name of Book</td>
<td>Writer of Book</td>
<td>Type of Book</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>Name of Book</td>
<td>Writer of Book</td>
<td>Type of Book</td>
<td><span class="status">Read</span></td>
<td><span class="rate three"><span></span><span></span><span></span></span></td>
</tr>
<tr class="read">
<td>Name of Book</td>
<td>Writer of Book</td>
<td>Type of Book</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>Name of Book</td>
<td>Writer of Book</td>
<td>Type of Book</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: #afafaf;
}
h1 {
font-family: helvetica;
color: #123abc;
}
tr[class="read"] {
background-image: linear-gradient(to right, green, yellow);
}
tr[class="to-read"] {
background-image: linear-gradient(to right, blue, yellow);
}
tr[class="in-progress"] {
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, yellow, orange);
}
tr[class="read"] span[class="status"] {
border: 1px solid black;
background-image: linear-gradient(to right, yellow, lime);
}
tr[class="in-progress"] span[class="status"] {
border: 1px solid black;
background-image: linear-gradient(to right, yellow, red);
}
span[class="status"], span[class^="rate"] {
height: 80%;
width: 80%;
padding: 5px 10px;
}
span[class^="rate"] span {
border: 1px solid black;
border-radius: 25px 25px;
margin: 0px 4px;
height: 12px;
width: 12px;
background-color: orange;
}
span[class~="one"]:nth-child(1) {
background-image: linear-gradient(to right, black, white);
}
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.2 Safari/605.1.15
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App