Build an Availability Table - Build an Availability Table

Tell us what’s happening:

i dont real understand the last question under the tests kindly help me look at it

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 class="time">9:00am</th>
      <th class="time">10:00am</th>
      <th class="time">11:00am</th>
      <th class="time">12:00pm</th>
    </tr>
  </thead>
  <tbody>
    <tr class="sharp">
      <td class="available-5">A</td>
      <td class="available-3">B</td>
      <td class="available-0">C</td>
      <td class="available-2">D</td>
    </tr>
    <tr class="half">
      <td class="available-1">E</td>
      <td class="available-2">F</td>
      <td class="available-4">G</td>
      <td class="available-5">H</td>
    </tr>
    <tr class="sharp">
      <td class="available-0">I</td>
      <td class="available-3">J</td>
      <td class="available-1">K</td>
      <td class="available-2">L</td>
    </tr>
    <tr class="half">
      <td class="available-4">M</td>
      <td class="available-2">N</td>
      <td class="available-5">O</td>
      <td class="available-1">P</td>
    </tr>
    <tr>
      <td class="available-3">Q</td>
      <td class="available-0">R</td>
      <td class="available-2">S</td>
      <td class="available-4">T</td>
    </tr>
  </tbody>
</table>
<div id="legend">
    <span>Availability</span>
    <div id="legend-gradient"></div>
</div>


</body>

</html>
/* file: styles.css */
:root {
  --color0: #ff0000;
  --color1: #ff0000;
  --color2: #ff0000;
  --color3:   #333;
   --color4:#333;
   --color5:#ff0000;
   --solid-border:#333;
   --dashed-border:#ff0000;
  }
 .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(--color1) 0%, 
    var(--color1) 50%, 
    var(--color2) 50%,
    var(--color2) 100%
  );
}

Your browser information:

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

Challenge Information:

Build an Availability Table - Build an Availability Table

hello! Test #35 wants you to use Gradient with multi-position color-stops as a linear-gradient. Also remember to use all of your --color# variables in the gradient.

i don’t know why its difficult for me to understand have try according to what you but i still don’t get may be you should try explain in simple way. i apriciate your effort

I will try to break it down in simpler words. Test #35 wants you to use this syntax for the #legend-gradient

linear-gradient( direction, color1 start% end%, color2 start% end%, ...)

Also, in your current code you are only using --color1 and --color2. But you also have --color0, --color3, --color4 and --color5 defined in :root, right? So you need to use all of them here.

If you have tried it and still have issues, please post your current updated code

1 Like

thank you as i follow this instruction i get it straight away i’m so happy

1 Like