Set table header border to be 1px solid black, its width to 6em : th border « Tags « HTML / CSS






Set table header border to be 1px solid black, its width to 6em

     
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">

th {
 border: 1px solid black;
 width: 6em;
}

</style>
</head>

<body>
    <form method="get" name="copresentations">
   <table cellspacing="0">
    <caption>
     Summary of Financial Data
    </caption>
    <tr>
     <th scope="col">F</th>
     <th scope="col">W</th>
     <th scope="col">P</th>
     <th scope="col">N</th>
    </tr>
    <tr>
     <th scope="row">2003</th>
     <td><input type="text" name="w2003" /></td>
     <td><input type="text" name="p2003" /></td>
     <td><input type="text" name="n2003" /></td>
    </tr>
    <tr>
     <th scope="row">2004</th>
     <td><input type="text" name="w2004" /></td>
     <td><input type="text" name="p2004" /></td>
     <td><input type="text" name="n2004" /></td>
    </tr>
   </table>
   <input type="submit" class="save" value="Save" />
  </form>
</body>

</html>

   
    
    
    
  








Related examples in the same category

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