English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
caption-The side CSS attribute sets the vertical position of the table title box. To horizontally align the title text within the title box, please usetext-alignAttribute.
The following table provides usage instructions and version history of this attribute, as well as its syntax in JavaScript scripts.
Default value: | top |
---|---|
Applies to: | Table |
Inheritance: | Yes |
Animatable: | No View Animation properties. |
Version: | CSS 2,3 |
JavaScript syntax: | object.style.captionSide="bottom" |
The syntax of this attribute is as follows:
caption-side: top | bottom | initial | inherit
The following examples demonstrate how to use caption-side attribute.
caption { caption-side: bottom; }Test and see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
top | Place the title box above the table box. |
bottom | Place the title box below the table box. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element adopts the caption of its parent element.-side attribute values. |
caption-Browser compatibility of the side attribute, the numbers in the following table represent the minimum version number of the browsers that support this attribute; all mainstream browsers support this attribute.
|
Warning: Internet Explorer 7and earlier versions do not support this caption-side attribute. IE8Only in<!DOCTYPE>Supports only when a valid value is specified.
See tutorial:CSS Tables.
Related attributes: text-align