CSS property: caption-side
Description
Specifies the position of the caption box with respect to the table box
This property specifies the position of the caption box with respect to the table box.
To align caption content horizontally within the caption box, use the text-align property.
Note: CSS2 described a different width and horizontal alignment behavior. That behavior will be introduced in CSS3 using the values top-outside
and bottom-outside
on this property.
Syntax
caption-side: top | bottom | inherit;
Syntax
Values
Versions
Examples
In this example, the caption-side
property places captions below tables. The caption will be as wide as the parent of the table, and caption text will be left-justified.
caption { caption-side: bottom; width: auto; text-align: left; }