Build an Availability Table - Build an Availability Table

Tell us what’s happening:

I cannot get the last two tests to pass. I have set two percentages for each color, double-checked for spelling errors, and it just wont work. What am I missing?

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Availability Table</title>
    <link rel="stylesheet" href="styles.css">
    </head>

<body>
   
<table>
    <tr class="sharp">
    <th>Monday</th>
    <th>Tuesday</th>
    <th>Wednesday</th>
    <th>Thursday</th>
    <th>Friday</th>
   </tr>
   <tr class="half">
       <th class="time">9am</th>
       <td class="available-1"></td>
       <td class="available-2"></td>
   </tr>
   <tr class="sharp">
      <th class="time">11am</th>
      <td class="available-3"></td>
      <td class="available-1"></td> 
   </tr>
   <tr class="half">
      <th class="time">1pm</th>
      <td class="available-4"></td>
      <td class="available-0"></td> 
   </tr>
   <tr class="sharp">
      <th class="time">3pm</th>
      <td class="available-5"></td>
      <td class="available-3"></td> 
   </tr>

</table>
<div id="legend">
      <span>Availability</span>
    <div id="legend-gradient"></div> 
    </div>
</body>

</html>
/* file: styles.css */
:root {
  --color0: red;
  --color1: pink;
  --color2: yellow;
  --color3: green;
  --color4: blue;
  --color5: purple;
  --solid-border: 2px solid black;
  --dashed-border: 2px dashed black;
}
.available-0 {
  background-color: var(--color0);
}

.available-1 {
  background-color: var(--color1);
}
.available-2 {
  background-color: var(--color2);
}
.available-3 {
  background-color: var(--color3);
}
.available-4 {
  background-color: var(--color4);
}
.available-5 {
  background-color: var(--color5);
}
.sharp td {
  border-bottom: var(--solid-border);
}
.half td {
  border-bottom: var(--dashed-border);
}
#legend-gradient {
  background-image: linear-gradient(var(--color0) 0% 15%,
  var(--color1) 15% 25%,
  var(--color2)25% 35%,
  var(--color3) 35% 55%,
  var(--color4) 55% 75%,
  var(--color5) 75% 100%,
  );
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36

Challenge Information:

Build an Availability Table - Build an Availability Table

It’s pretty close, but look at some examples here, note the color stops:

https://www.w3schools.com/CSSref/func_linear-gradient.php

Example

A linear gradient with two-position color stops:
#grad {
  background: linear-gradient(
    to right,
    red 17%,
    orange 17% 34%,
    yellow 34% 51%,
    green 51% 68%,
    blue 68% 84%,
    indigo 84%
  );
} 

I even changed the percentages to be like the example and it won’t pass. it is also not showing up as anything on the preview.

you are missing spaces, make sure you have all the spaces in the right place

also remove the comma after the last color

It finally worked, thank you!