Tell us what’s happening:
i need help cuz my last 5 codes doesnt work and theres no way to know what wrong with them, need help with one and i can tale care of the rest, that one says
" You should have an attribute selector to target the first descendant of span elements that have the word one as a part of their class value."
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></td>
<td></td>
<td></td>
<td><span class="status">Read</span></td>
<td><span class="rate two"><span></span><span></span><span></span></span></td>
</tr>
<tr class="to-read">
<td></td>
<td></td>
<td></td>
<td><span class="status">To Read</span></td>
<td><span class="rate three"><span></span><span></span><span></span></span></td>
</tr>
<tr class="in-progress">
<td></td>
<td></td>
<td></td>
<td><span class="status">In Progress</span></td>
<td><span class="rate two"><span></span><span></span><span></span></span></td>
</tr>
<tr class="read">
<td></td>
<td></td>
<td></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(to left, orange, green);
}
tr[class=to-read] {
background-image: linear-gradient( to right, lightblue, pink);
}
tr[class=in-progress] {
background-image: linear-gradient(to right, blue, green);
}
tr[class=to-read] span[class=status] {
display: inline-block;
border: 2px solid gray;
background-image: linear-gradient(to left, yellow, black);
}
tr[class=read] span[class=status] {
border: 2px solid gray;
display: inline-block;
background-image: linear-gradient(to left, purple, gray);
}
tr[class=in-progress] span[class=status] {
border: 2px solid gray;
display: inline-block;
background-image: linear-gradient(to right, yellow, red);
}
span[class=status], span[class^=rate] {
height: 20px;
display: inline-block;
width: 40px;
padding: 0;
}
span[class^=rate] > span {
border: 2px solid gray;
border-radius: 5px;
margin: 0;
height: 20px;
width: 40px;
background-color: yellow;
display: inline-block;
}
span[class*="one"] span:first-child {
display: inline-block;
background-image: linear-gradient(to right, orange, yellow);
}
span[class*="two"] span:nth-child(-n+2) {
display: inline-block;
background-image: linear-gradient(to right, orange, yellow);
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App