Tell us what’s happening:
I did each and every task but my test not passing, please guide me to complete this project.
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>
<tr>
<th>Title</th>
<th>Author</th>
<th>Category</th>
<th>Status</th>
<th>Rate</th>
</tr>
<tr class="read">
<td>book1</td>
<td>aut1</td>
<td>horror</td>
<td><span class="status">Read</span></td>
<td><span class="rate">
<span class="one"></span>
<span class="one"></span>
<span class="one"></span>
</span>
</td>
</tr>
<tr class="to-read">
<td>book2</td>
<td>aut2</td>
<td>comedy</td>
<td><span class="status">To Read</span></td>
<td><span class="rate">
<span class="two"></span>
<span class="two"></span>
<span class="two"></span>
</span>
</td>
</tr>
<tr class="in-progress">
<td>book3</td>
<td>aut3</td>
<td>romance</td>
<td><span class="status">In Progress</span></td>
<td><span class="rate">
<span class="three"></span>
<span class="three"></span>
<span class="three"></span>
</span>
</td>
</tr>
</table>
</body>
</html>
/* file: styles.css */
.read {
background-image: linear-gradient(to right, pink, lightblue);
}
.to-read {
background-image: linear-gradient(to right, yellow, lightblue);
}
.in-progress {
background-image: linear-gradient(to right, purple, lightblue);
color: white;
}
span {
display: inline-block;
}
tr[class="to-read"] span[class="status"] {
border: 1px solid red;
background-image: linear-gradient(to right, orange, lightblue);;
}
tr[class="read"] span[class="status"] {
border: 1px solid red;
background-image: linear-gradient(to right, red, blue);
color: white;
}
tr[class="in-progress"] span[class="status"] {
border: 1px solid red;
background-image: linear-gradient(to right, teal, lightblue);
}
span[class="rate"], span[class="status"] {
height: 1em;
width: 5em;
padding: 5px;
}
span[class="rate"] span {
border: 1px solid black;
border-radius: 4px;
margin: 1px;
width: 10px;
height: 10px;
background-color: lightyellow;
}
span[class="one"]:first-child {
background-image: linear-gradient(to right, yellow, orange);
}
span[class="two"]:nth-child(-n + 2) {
background-image: linear-gradient(to right, yellow, orange);
}
span[class="three"]:nth-child(-n + 3) {
background-image: linear-gradient(to right, yellow, orange);
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App