忘備録

日々の調べ物をまとめる。アウトプットする。基本自分用。

tr に min-height 当てたいけどできなかった時

td に height 当たればいいんじゃない?

<!DOCTYPE html>
<html>
<head>
<style>
  table, td, th {
    border: 1px solid black;
    border-collapse: collapse;
  }
  td { height: 10px; }
</style>
</head>
<body>
<h1>Use "height" to td tag for height of tr tag instead of "min-height"</h1>
<table>
  <caption>example</caption>
  <thead>
    <tr>
      <th>th1</th>
      <th>th2</th>
      <th>th3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>td1</td>
      <td>td2</td>
      <td>td3</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

<p>Reference</p>
<cite><a href="https://stackoverflow.com/questions/19432092/can-i-use-a-min-height-for-table-tr-or-td">https://stackoverflow.com/questions/19432092/can-i-use-a-min-height-for-table-tr-or-td</a></cite>
</body>
</html>