12345678
 
 
 
 
 
 
 
 

Cells:

  1. in first column (green) width:40px, padding-right:20px, border-right:10px
  2. in second column (blue) width:20px, border-right:10px

Tables:

  1. first normal,
  2. second 'fixed',
  3. third with divs inside (width moved on those),
  4. fourth has (total) width on cols,
  5. fifth has first row with cells with total width (no padding, no border) and height 0,
  6. sixth's cells have border-box,
  7. seventh's cells have content-box,
  8. eighth has border-collapse: collapse

Results: width on cell (td) is interpreted as:

  1. content-box width in: IE/Win/auto, IE/Win/fixed/standards, Gecko 1.4+, Op6+, Saf3
  2. border-box width in: IE/Win/fixed/quirks, IE5/Mac, Op9.5 with border-box

Divs:

  1. first set 'normal',
  2. second with content-box,
  3. third with padding-box,
  4. fourth with border-box.

Default is:

  1. content-box: Gecko, IE/Win/standards, Op9, Op7-8/standards, Saf, IE5/Mac/standards
  2. border-box: IE/Win/quirks, IE5/Mac/quirks, Op7-8/quirks

Related: