Tables
caption-side
Used to set the position of a table's caption with respect to the table.
Value | top | bottom | left | right | inherit |
Initial | top |
Used with | table-caption elements |
Inherited | yes |
Example | caption {caption-side : left} |
To align the text of a caption, you can use the 'text-align' and 'vertical-align' properties.
table-layout
Used to select the algorithm which is used to draw the table.
Value | auto | fixed | inherit |
Initial | auto |
Used with | table elements |
Inherited | no |
Example | table {table-layout : fixed} |
The Fixed algorithm is faster, since it divides up unused space to determine column widths, rather than adjusting widths to obtain optimal appearance.
The Auto algorithm requires the entire table to be downloaded before it is displayed, but often provides a better appearance.
border-collapse
Value | collapse | seperate | inherit |
Initial | collapse |
Used with | table elements |
Inherited | yes |
Example | table {border-collapse : seperate} |
The seperate value gives each cell its own border, with the border-spacing property (described below) giving the seperation of the borders.
border-spacing
Specifies the space between borders when used with separated borders.
Value | length [length] | inherit |
Initial | 0 |
Used with | table elements |
Inherited | yes |
Example | table {border-spacing : 0.5em 0.5em} |
The lengths specify the horizontal and vertical distances respectively. If only one value is given, it is used for both.
empty-cells
Controls the drawing of borders around cells with no visibele content, when used with seperated borders.
Value | show | hide | inherit |
Initial | show |
Used with | table cell elements |
Inherited | yes |
Example | table {border-spacing : 0.5em 0.5em} |
Site Map
|