td padding: 0; margin: 0; : td padding « Tags « HTML / CSS






td padding: 0; margin: 0;

   

<!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">
table {
 border-collapse: collapse;
 border: 1px solid black;
}

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

th {
 border: 1px solid black;
 width: 6em;
}
td {
 width:6em;
 border: 1px solid black;
 padding: 0;
 margin: 0;
}

input {
 width: 100%;
 border: none;
 margin: 0;
}

.save {
 margin-top: 1em;
 width: 5em;
}

input {
 width: 100%;
 border: none;
 margin: 0;
 text-align: right;  
}
</style>
</head>

<body>
    <form method="get" name="copresentations">
   <table cellspacing="0">
    <caption>
     Summary of Financial Data
    </caption>
    <tr>
     <th scope="col">Fiscal Year </th>
     <th scope="col">Worksite<br />
      Presentations </th>
     <th scope="col">ing Grades </th>
     <th scope="col">Number of Presentators </th>
    </tr>
    <tr>
     <th scope="row">1999</th>
     <td><input type="text" name="1999" /></td>
     <td><input type="text" name="1999" /></td>
     <td><input type="text" name="1999" /></td>
    </tr>
    <tr>
     <th scope="row">2000</th>
     <td><input type="text" name="2000" /></td>
     <td><input type="text" name="2000" /></td>
     <td><input type="text" name="2000" /></td>
    </tr>
    <tr>
     <th scope="row">2001</th>
     <td><input type="text" name="2001" /></td>
     <td><input type="text" name="2001" /></td>
     <td><input type="text" name="2001" /></td>
    </tr>
    <tr>
     <th scope="row">2002</th>
     <td><input type="text" name="2002" /></td>
     <td><input type="text" name="2002" /></td>
     <td><input type="text" name="2002" /></td>
    </tr>
    <tr>
     <th scope="row">2003</th>
     <td><input type="text" name="2003" /></td>
     <td><input type="text" name="2003" /></td>
     <td><input type="text" name="2003" /></td>
    </tr>
    <tr>
     <th scope="row">2004</th>
     <td><input type="text" name="2004" /></td>
     <td><input type="text" name="2004" /></td>
     <td><input type="text" name="2004" /></td>
    </tr>
   </table>
   <input type="submit" class="save" value="Save" />
  </form>
</body>

</html>

   
    
    
  








Related examples in the same category

1.Table cell padding
2.Cell padding
3.Set margin and padding for td tag
4.td padding-left: 11px;
5.td padding-right: 11px;
6.td padding: 5px;
7.td padding: 2px;
8.td padding: 7px;
9.td, th, caption padding: 5px;
10.td padding:20px;