Tell us what’s happening:
Failed:41. You should have an attribute selector to target the span elements which are direct children of span elements with the class value starting with rate.
I maybe can’t see it, been working on this a few days to be fair. It’s one of those labs that isn;t as plain sailing as I wanted it to be.
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>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 Metamorphosis</td>
<td>Franz Kafka</td>
<td>Novella</td>
<td>
<span class="status">To Read</span>
</td>
<td><span class="rate two">
<span></span>
<span></span>
<span></span>
</span>
</td>
</tr>
<tr class="in-progress">
<td>Lord of The Flies</td>
<td>William Golding</td>
<td>Allegorical Novel</td>
<td>
<span class="status">In Progress</span>
</td>
<td>
<span class="rate"><span></span>
<span></span>
<span></span></span>
</td>
</tr>
<tr class="read">
<td>Do Andriods Dream of Electric Sheep?</td>
<td>Phillip K. Dick</td>
<td>Science Fiction</td>
<td class="read"><span class="status">Read</span></td>
<td><span class="rate three">
<span></span>
<span></span>
<span></span>
</span>
</td>
</tr>
</tbody>
</table>
</body>
</html>
/* file: styles.css */
tr[class="read"]{
background-image:linear-gradient(#215e61 30%,#13afb7 20%);
}
tr[class="to-read"]{
background-image:linear-gradient(#40969d 30%,#9cf5fb 20%);
}
tr[class="in-progress"]{
background-image:linear-gradient(#06aab6 30%,#6fb5ba 20%);
}
tr[class="in-progress"]{
background-image:linear-gradient(#025257 30%,#6fb5ba 20%);
}
span {
display: inline-block;
}
tr[class="to-read"] span[class="status"]{
border:2px solid #1d91f7;
background-image:linear-gradient(#058afe 30%,#1decf7 20%);
}
tr[class="read"] span[class="status"]{
border: 1px solid black;
background-image:linear-gradient(#058afe 30%,#1decf7 20%);
}
tr[class="in-progress"] span[class="status"]{
border: 1px solid black;
background-image:linear-gradient(#058afe 30%,#1decf7 20%);
}
span[class="status"],span[class^="rate"]{
height: 80%;
width: 80%;
padding: 5px;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36 Edg/150.0.0.0
Challenge Information:
Build a Book Inventory App - Build a Book Inventory App