Page Widget How to - Hover Table cell Colspan








Question

We would like to know how to hover Table cell Colspan.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {<!--from   ww w  .  j a va 2 s. c  o  m-->
  font: normal 11px arial;
  color: #555
}

table {
  border-color: #ddd;
  width: 400px
}

table tbody td {
  padding: 6px 3px
}

table tbody td:hover {
  background: #FFE8B3
}
</style>
</head>
<body>
  <table border="1">
    <tbody>
      <tr>
        <td>Sutun 1</td>
        <td>Sutun 2</td>
        <td>Sutun 3</td>
      </tr>
      <tr>
        <td colspan="2">Sutun 1</td>
        <td>Sutun 3</td>
      </tr>
      <tr>
        <td>Sutun 1</td>
        <td>Sutun 2</td>
        <td>Sutun 3</td>
      </tr>
    </tbody>
  </table>
  <br />
  
</body>
</html>

The code above is rendered as follows: