Build an Availability Table - Build an Availability Table

Tell us what’s happening:

i dont know what im doing wrong for no.35. ive tried writing it different but i dont know what im doing wrong.

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">
    <link href="styles.css" rel="stylesheet" />
    <title>Availability Table</title>
</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">
            <td class="time available-0">1p</td>
            <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"><td class="time available-0">2p</td>
            <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">
            <td class="time available-0">3p</td>
            <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">
            <td class="time available-0">4p</td>
            <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>
    </tbody>
</table>
<br>
<br>
<div id="legend">
    <span>Availability</span>
    <div id="legend-gradient"></div>
    </div>
</body>

</html>
/* file: styles.css */
:root {
  --color0: white; 
  --color1: violet;
  --color2: yellow;
  --color3: pink;
  --color4: orange;
  --color5: yellow;
  --solid-border: #ffd033;
  --dashed-border: #333;
}

.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);
}



#legend-gradient {
  background-image: linear-gradient(
    
    var(--color0),
    var(--color0) 10%,
    var(--color1) 10%,
    var(--color1) 20%,
    var(--color2) 20%,
    var(--color2) 40%,
    var(--color3) 40%,
    var(--color3) 60%,
    var(--color4) 60%,
    var(--color4) 80%,
    var(--color5) 80%,
    var(--color5) 100%
  );
}


.sharp td {
  border-bottom: var(--solid-border);
  
}

.half td {
  border-bottom: var(--dashed-border);
}


Your browser information:

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

Challenge Information:

Build an Availability Table - Build an Availability Table

Welcome to the forum @chiarasj13

Here is an article you may find helpful.

Happy coding

specifically look at this example: Gradient with multi-position color-stops

1 Like