Revision 105928 of Tables

  • Revision slug: Useful_CSS_tips/Tables
  • Revision title: Tables
  • Revision id: 105928
  • Created:
  • Creator: Lombardp
  • Is current revision? No
  • Comment /* Borders */

Revision Content

Borders

There are two distinct models for setting borders on table cells in CSS:

  • Separated borders model
  • Collapsing borders model

The separated borders model is the default setting, with this model each cell has its own border and a table is rendered as follows.

   
   
   

Fixed header

Revision Source

<h3 name="Borders"> Borders </h3>
<p>There are two distinct models for setting borders on table cells in CSS:
</p>
<ul><li> Separated borders model
</li><li> Collapsing borders model
</li></ul>
<p>The <b>separated borders model</b> is the default setting, with this model each cell has its own border and a table is rendered as follows.
</p>
<table cellspacing="4" style="border: 1px solid black;">
<tbody><tr><td> </td><td> </td><td> </td></tr>
<tr><td> </td><td> </td><td> </td></tr>
<tr><td> </td><td> </td><td> </td></tr>
</tbody></table>
<h3 name="Fixed_header"> Fixed header </h3>
Revert to this revision