Tell us what’s happening:
I do not know what is wrong here. I have tried everything but, I keep getting the same error
Your code so far
<!-- file: index.html -->
/* file: styles.css */
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 OPR/120.0.0.0
Challenge Information:
Build an Availability Table - Build an Availability Table
https://www.freecodecamp.org/learn/full-stack-developer/lab-availability-table/build-an-availability-table
ILM
September 5, 2025, 9:59am
2
Hey there,
Please update the message to include your code. The code was too long to be automatically inserted by the help button.
When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
Tell us what’s happening:
I can not seems get the problem I have here with the linear gradient
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Availability Table</title>
</head>
<body>
<table>
<tr>
<th>Time</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
<!-- All <td> elements should have a class of available-# where # is 0-5 which indicates number of people available -->
<tr class="sharp">
<th class="time">8:00 - 9:00</th>
<td class="available-2">Available</td>
<td class="available-0">Available</td>
<td class="available-3">Available</td>
<td class="available-5">Available</td>
<td class="available-0">Available</td>
<td class="available-4">Available</td>
<td class="available-0">Available</td>
</tr>
<tr class="half">
<th class="time">9:00 - 10:00</th>
<td class="available-0">Available</td>
<td class="available-1">Available</td>
<td class="available-2">Available</td>
<td class="available-0">Available</td>
<td class="available-4">Available</td>
<td class="available-0">Available</td>
<td class="available-5">Available</td>
</tr>
<!-- Add more rows as needed -->
<tr class="half">
<th class="time">10:00 - 11:00</th>
<td class="available-0">Available</td>
<td class="available-2">Available</td>
<td class="available-2">Available</td>
<td class="available-5">Available</td>
<td class="available-0">Available</td>
<td class="available-3">Available</td>
<td class="available-4">Available</td>
</tr>
<tr class="sharp">
<th class="time">11:00 - 12:00</th>
<td class="available-3">Available</td>
<td class="available-5">Available</td>
<td class="available-0">Available</td>
<td class="available-3">Available</td>
<td class="available-0">Available</td>
<td class="available-4">Available</td>
<td class="available-2">Available</td>
</tr>
</table>
<div id="legend">
<span>Availability
</span>
<div id="legend-gradient"></div>
</div>
</body>
</html>
/* file: styles.css */
* {
box-sizing: border-box;
}
:root {
--color0: #246e40;
--color1: #443b61;
--color2: #816e6e1a;
--color3: #4d1515;
--color4: rgba(255, 36, 189, 0.8);
--color5: #d91919;
--solid-border: 2px solid black;
--dashed-border: 2px dashed rgb(173, 43, 43);
}
table {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
font-family: Arial, sans-serif;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: center;
word-wrap: break-word;
}
.available-0 {
background-color: var(--color0);
color: white;
}
.available-1 {
background-color: var(--color1);
color: white;
}
.available-2 {
background-color: var(--color2);
color: black;
}
.available-3 {
background-color: var(--color3);
color: white;
}
.available-4 {
background-color: var(--color4);
color: white;
}
.available-5 {
background-color: var(--color5);
color: white;
}
.sharp td {
border-bottom: var(--solid-border);
}
.half td {
border-bottom: var(--dashed-border);
}
#legend {
margin-top: 20px;
font-family: Arial, sans-serif;
}
#legend-gradient {
width: 260px;
height: 16px;
border-radius: 999px;
outline: 1px solid rgba(0,0,0,.12);
/* Hard-stop linear gradient using two color-stops per step (percentages) */
background-image: linear-gradient(to right, var(--color0) 0%, var(--color0) 16.66%, var(--color1) 16.67%, var(--color1) 33.32%, var(--color2) 33.33%, var(--color2) 49.98%, var(--color3) 49.99%, var(--color3) 66.64%, var(--color4) 66.65%, var(--color4) 83.3%, var(--color5) 83.4%, var(--color5) 100%);
}
}
#legend-gradient {
height: 30px;
border: 1px solid #000;
margin-bottom: 10px;
}
span {
display: inline-block;
width: 16%;
text-align: center;
font-size: 12px;
}
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 OPR/120.0.0.0
Challenge Information:
Build an Availability Table - Build an Availability Table
https://www.freecodecamp.org/learn/full-stack-developer/lab-availability-table/build-an-availability-table
I have gone through everything, read the whatever I have to read I keep getting an error
ILM
September 5, 2025, 9:21pm
6
please do not create multiple
topics for the same challenge, I have merged your topics together
amanfobaffour16:
I keep getting an error
What is the error?
Here are some troubleshooting steps you can follow. Focus on one test at a time:
Are there any errors or messages in the console?
What is the requirement of the first failing test?
Check the related User Story and ensure it’s followed precisely.
What line of code implements this?
If this does not help you solve the problem, please reply with answers to these questions.
ILM
September 5, 2025, 9:46pm
8
so you went to mdn and consulted the example?