Build an Availability Table - Build an Availability Table

Tell us what’s happening:

I keep missing test number 35 and I don’t know why, I have already made a lot of changes still the same

I just made the changes no result
#legend-gradient {
width: 150px;
height: 30px;
background-image: linear-gradient(
90deg,
var(–color1)0% 20%,
var(–color2)20% 40%,
var(–color3)40% 60%,
var(–color4)60% 80%,
var(–color5)80% 100%
);
}

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> <!-- Empty cell for alignment -->
                <th>Monday</th>
                <th>Tuesday</th>
                <th>Wednesday</th>
                <th>Thursday</th>
                <th>Friday</th>
            </tr>
        </thead>
        <tbody>
            <tr class="sharp">
                <th class="time">8:00-9:00</th>
                <td class="available-3">3</td>
                <td class="available-2">2</td>
                <td class="available-5">5</td>
                <td class="available-4">4</td>
                <td class="available-1">1</td>
            </tr>
            <tr class="half">
                <th class="time">9:00-10:00</th>
                <td class="available-0">0</td>
                <td class="available-1">1</td>
                <td class="available-3">3</td>
                <td class="available-5">5</td>
                <td class="available-2">2</td>
            </tr>
            <tr class="sharp">
                <th class="time">10:00-11:00</th>
                <td class="available-4">4</td>
                <td class="available-3">3</td>
                <td class="available-2">2</td>
                <td class="available-1">1</td>
                <td class="available-0">0</td>
            </tr>
            <tr class="half">
                <th class="time">11:00-12:00</th>
                <td class="available-1">1</td>
                <td class="available-5">5</td>
                <td class="available-4">4</td>
                <td class="available-3">3</td>
                <td class="available-2">2</td>
            </tr>
            <tr>
                <th class="time">12:00-1:00</th>
                <td class="available-2">2</td>
                <td class="available-4">4</td>
                <td class="available-3">3</td>
                <td class="available-1">1</td>
                <td class="available-5">5</td>
            </tr>
        </tbody>
    </table>

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

</body>

</html>
/* file: styles.css */
:root {
  --color0: #f4f4f4;
  --color1: #00ffe0;
  --color2: #d5d5d2;
  --color3: #20ff00;
  --color4: #d00e50;
  --color5: #fe0e50;

  --solid-border: 2px solid #eee;
  --dashed-border: 2px dashed #222;
}

.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 {
  width: 100%;
  height: 100px;
  background-image: linear-gradient(
    var(--color0) 0%, var(--color0)50%,
    var(--color5)50%, var(--color5) 100%
  )
}

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

Challenge Information:

Build an Availability Table - Build an Availability Table

Hi @iobateru

  1. 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.

For this step you need to include the colours:

  • --color1
  • --color2
  • --color3
  • --color4
  • --color5

Happy coding

I just did that but its still not working

if you are writing this, make sure you have all the spaces that are needed (hint: after the color)

I keep getting the same thing again and again

Pay attention to the spacing…and 0% and 100% are not needed.

having them or not having them doesn’t matter, as long as everything else is correct