CSS caption-side
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The caption-side
CSS property sets the vertical position of the table caption box. To align caption text horizontally within the caption box, use the text-align
property.
The following table summarizes the usages context and the version history of this property.
Default value: | top |
---|---|
Applies to: | The table <caption> element |
Inherited: | Yes |
Animatable: | No. See animatable properties. |
Version: | CSS 2, 3 |
Syntax
The syntax of the property is given with:
The example below shows the caption-side
property in action.
Example
Try this code »caption {
caption-side: bottom;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
top |
Positions the caption box above the table box. |
bottom |
Positions the caption box below the table box. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element caption-side property. |
Browser Compatibility
The caption-side
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: CSS Tables.
Related properties: text-align