th[scope="col"] {border-bottom: 1px solid gray;} : th border « Tags « HTML / CSS






th[scope="col"] {border-bottom: 1px solid gray;}

   

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Website Graph</title>
<style type="text/css" media="screen">
body {margin: 2em 5%;}
table {border-collapse: collapse; border-spacing: 0;}
th, td {padding: 0.25em 0.75em;}

th[scope="col"] {border-bottom: 1px solid gray;}
th[scope="row"] {border-right: 1px solid gray;}

</style>
</head>
<body>

<table>
  <caption>Web traffic</caption>
  <thead>
    <tr>
      <th scope="col">Month</th>
      <th scope="col" class="hits">Pageviews</th>
      <th scope="col" class="views">Visitors</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">January 2010</th>
      <td>1,367,234</td>
      <td>326,578</td>
    </tr>
    <tr>
      <th scope="row">February 2010</th>
      <td>1,491,262</td>
      <td>349,091</td>
    </tr>
  </tbody>
</table>

</body>
</html>

   
    
    
  








Related examples in the same category

1.Set table header border to be 1px solid black, its width to 6em
2.Set table border for table header
3.Table header with border
4.th border-left: 1px solid #f4f4f4;
5.th border-bottom: solid 2px #fff;
6.th border-left: 1px solid #EDC9C9;
7.th border-bottom: 1px solid #FFF;
8.th border-left: 1px solid #fff;
9.th border: 1px solid black;
10.th border-bottom-width: 1px;
11.th border-bottom-style: solid;
12.th border-bottom-color: #CDC1A7;
13.th, tfoot td border: thin solid black;text-align: center;font-weight: bold;
14.thead th {border-bottom: 1px solid #333; text-align: center; font-weight: bold;}