Build an Availability Table - Build an Availability Table

Tell us what’s happening:

Why is the #35 failing? By used Ai and i think that I drove the technology insane. I change the CSS block a variety different times by using decimals and whole numbers. Please assist..

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 rel="stylesheet" href="styles.css">
    <title>Availability Table</title>
</head>

<body>
  <table>
    <thead>
        <tr>
            <th class="time">11:00 AM</th>
            <th class="time">12:00 PM</th>
            <th class="time">01:00 PM</th>
            <th class="time">02:00 PM</th>
        </tr>
    </thead>
    <tbody>
        <tr class="sharp">
            <td class="available-0">Row1 Cell 1</td>
            <td class="available-0">Row1 Cell 2</td>
            <td class="available-0">Row1 Cell 3</td>
            <td class="available-0">Row1 Cell 4</td>
        </tr>
        <tr class="sharp">
            <td class="available-1">Row2 Cell 1</td>
            <td class="available-1">Row2 Cell 2</td>
            <td class="available-1">Row2 Cell 3</td>
            <td class="available-1">Row2 Cell 4</td>
        </tr>
        <tr class="half">
            <td class="available-2">Row3 Cell 1</td>
            <td class="available-2">Row3 Cell 2</td>
            <td class="available-2">Row3 Cell 3</td>
            <td class="available-2">Row3 Cell 4</td>
        </tr>
        <tr class="half">
            <td class="available-3">Row4 Cell 1</td>
            <td class="available-3">Row4 Cell 2</td>
            <td class="available-3">Row4 Cell 3</td>
            <td class="available-3">Row4 Cell 4</td>
        </tr>
        <tr>
            <td class="available-4">Row5 Cell 1</td>
            <td class="available-4">Row5 Cell 2</td>
            <td class="available-4">Row5 Cell 3</td>
            <td class="available-4">Row5 Cell 4</td>
        </tr>
        <tr>
            <td class="available-5">Row6 Cell 1</td>
            <td class="available-5">Row6 Cell 2</td>
            <td class="available-5">Row6 Cell 3</td>
            <td class="available-5">Row6 Cell 4</td>
        </tr>
    </tbody>
  </table>
  <div id="legend">
    <span>Availability</span>
    <div id="legend-gradient"></div>
  </div>
</body>
</html>
/* file: styles.css */

table {
  border: 2px solid black;
}

:root {
  --color0: #ADD8E6;
  --color1: #C0C0C0;
  --color2: #FFFF00;
  --color3: #FF00FF;
  --color4: #00FF00;
  --color5: #FFC0CB;
  --solid-border: 2px solid black;
  --dashed-border: 3px 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(
    to right,
    var(--color0) 0%, var(--color0) 20%,
    var(--color1) 20%, var(--color1) 40%,
    var(--color2) 40%, var(--color2) 60%,
    var(--color3) 60%, var(--color3) 80%,
    var(--color4) 80%, var(--color4) 90%,
    var(--color5) 90%, var(--color5) 100%
  );
}

span {
  font-family: Arial, sans-serif;
  font-size: 25px; 
}

Your browser information:

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

Challenge Information:

Build an Availability Table - Build an Availability Table

have a look at this topic and see if that helps solving yours, happy coding :slight_smile: Build an Availability Table - Build an Availability Table - #5 by dhess

This really sucked :disguised_face: , but thank you for the assistance. I figured it out. :zany_face:

1 Like