Build an Availability Table - Build an Availability Table

Tell us what’s happening:

i answer the whole test & the last question didn’t mark as true unless i answer the correct answer
"You should give the #legend-gradient element a linear gradient that transitions between all the colors from --color0 to --color5. Each color value should have two color stops (expressed as percentages) to make the transition between colors a hard line.

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>
        <thead>
            <tr>
                <th></th>
                <th>Monday</th>
                <th>Tuesday</th>
                <th>Wednesday</th>
                <th>Thursday</th>
                <th>Friday</th>
            </tr>
            </thead>
        
        <tbody>
            <tr class="sharp">
                <th class="time">9 AM</th>
                <td class="available-1"></td>
                <td class="available-2"></td>
                <td class="available-3"></td>
                <td class="available-4"></td>
                <td class="available-5"></td>
            </tr>

            <tr class="half">
                <th class="time">10 AM</th>
                <td class="available-5"></td>
                <td class="available-4"></td>
                <td class="available-0"></td>
                <td class="available-3"></td>
                <td class="available-2"></td>
            </tr>

            <tr class="sharp">
                <th class="time">11 AM</th>
                <td class="available-2"></td>
                <td class="available-1"></td>
                <td class="available-4"></td>
                <td class="available-5"></td>
                <td class="available-3"></td>
            </tr>

            <tr class="half">
                <th class="time">1 PM</th>
                <td class="available-1"></td>
                <td class="available-2"></td>
                <td class="available-3"></td>
                <td class="available-4"></td>
                <td class="available-5"></td>
            </tr>

            <tr class="sharp">
                <th class="time">2 PM</th>
                <td class="available-5"></td>
                <td class="available-4"></td>
                <td class="available-2"></td>
                <td class="available-1"></td>
                <td class="available-3"></td>
            </tr>
            </tbody>
    
    </table>

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

</body>
</html>
/* file: styles.css */
:root {
  --color0: #FFFFFF;
  --color1: #CDFDCD;
  --color2: #9BFC9B;
  --color3: #51FB51;
  --color4: #05C705;
  --color5: #037C03;
  --solid-border: 1px solid black;
  --dashed-border: 1px 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(
    90deg,
    var(--color0), var(--color0) 15%,
    var(--color1) 15%, var(--color1) 30%,
    var(--color2) 30%, var(--color2) 45%,
    var(--color3) 45%, var(--color3) 60%,
    var(--color4) 60%, var(--color4) 75%,
    var(--color5) 75%, var(--color5) 100%
  );
  width: 200px;
  height:20px;
}
#legend {
  display: flex;
  align-items: center;
  gap: 10px;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.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

Welcome to the forum @mahmoudsaadbedo

35. You should use two color-stops (expressed in percentage) to make the transition from one color to the following color a hard line for your #legend-gradient. Remember to use your --color# variables.

Your code is not using two colour stops.

Happy coding

here an example: Gradient with multi-position color-stops