CSS caption-side Property

CSS caption-side property sets vertical position of a table-caption.

Usages

The following table outline the usages and version history of this property.

Default value: top
Applies to: caption element
Inherited: Yes
Version: CSS2
JavaScript Syntax: object.style.captionSide = "bottom"

Syntax

Here is a syntax for the CSS caption-side property

 caption-side: top | bottom | initial | inherit;

Property Values

The following table describes the values of this property.

Value Description
top Sets the caption above the table
bottom Sets the caption below the table
initial Sets default value of this property
inherit Inherits this property from its parent element

Examples

The example below shows to sets caption-side property.

 .one {   caption-side: top; } .two {   caption-side: bottom; }

Browser Compatibility

  • Google Chrome 1+
  • Mozilla Firefox 1+
  • Internet Explorer 8+
  • Opera 4+
  • Safari 1+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.