Table

The table class is used for styling an entire table. It provides default settings for cells of the table as well as settings that apply to the table as whole (e.g. borders and margins of the table). The caption of a table is placed above it and uses the figure-caption style.

Selectors

  • Definitions:

    • table

Style Settings

See also: Table Cell, Paragraph, Inline

Setting Type Examples Description
border-color
border-top-color
border-left-color
border-bottom-color
border-right-color
Color rgb(0,0,0), #000000 The color of any border line around the table.
border-style
border-top-style
border-left-style
border-bottom-style
border-right-style
Symbol solid, none The styling of any border line around the table.
border-width
border-top-width
border-left-width
border-bottom-width
border-right-width
Length 0.5em The width of any border line around the table.
caption-placement Symbol before, after The placement of the table caption.
padding-collapse Boolean yes, no Whether paddings of adjacent cells should collapse if there is no separator.

Pseudoclasses

See also: Table Cell, Paragraph, Inline

Example

// Set the borders and margins of a table and define a default font for all cells
table {
  border-style:     solid
  border-width:     1pt

  margin-top:       20pt
  margin-bottom:    20pt

  font-family:        "Helvetica Neue"
}

// Center all table captions and create a small gap between table and caption
table figure-caption {
  text-alignment:   center
  margin-bottom:    10pt
}