lundi 15 mars 2021

How To Build Custom Table That Asymmetrical in HTML

I wanted to make a table that is asymmetrical as seen at the image below. the column for No. doesn't have the same width with it's upper column which is TUJUAN column. So how to do this?

enter image description here

this is my current code :

<table class="theme-1">
          <tr>
            <th>
              Tujuan
            </th>
            <th>
              Negara
            </th>
            <th>
              Berangkat
            </th>
            <th>
              Kembali
            </th>
            <th>
              Keperluan
            </th>
            <th>
              Keterangan
            </th>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <th>No.</th>
            <th>Nama Pengikut</th>
            <th>Keterangan</th>
          </tr>
          <tr>
            <td class="no-min-height">1</td>
            <td class="no-min-height"></td>
            <td class="no-min-height"></td>
          </tr>
          <tr>
            <td class="no-min-height">2</td>
            <td class="no-min-height"></td>
            <td class="no-min-height"></td>
          </tr>
          <tr>
            <td class="no-min-height">3</td>
            <td class="no-min-height"></td>
            <td class="no-min-height"></td>
          </tr>
          <tr>
            <td class="no-min-height">4</td>
            <td class="no-min-height"></td>
            <td class="no-min-height"></td>
          </tr>
</table>
.theme-1 td:not(.no-min-height) {
  height: 150px;
}



Aucun commentaire:

Enregistrer un commentaire