A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/css/properties/caption-side below:

caption-side · WebPlatform Docs

caption-side Summary

Specifies the placement of a table caption.

Overview table
Initial value
top
Applies to
Table-caption elements
Inherited
Yes
Media
visual

Computed value
:

Animatable
No

CSS Object Model Property
:

Syntax Values
top
Positions the caption box above the table box.
bottom
Positions the caption box below the table box.
inherit
Takes the same specified value as the property for the element’s parent.
Examples

The following example constructs a table with standard HTML elements. The style rule places the caption above the table.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<style type="text/css">
caption {
    caption-side:top;
}
</style>
<table><tr><td>A simple table.</td></tr>
<caption>Table caption.</caption>
</table>

This example uses CSS to construct a table using display attributes. This caption is also placed above its associated table.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

<style type="text/css">
.table {
    display:table;
    border:1px #eee outset;
    border-spacing:2px;
}
.cell {
    display:table-cell;
    border:1px solid black;
}
.caption {
    display:table-caption;
    caption-side:top;
}
</style>
<div class="table">
<span class="cell">Table content.</span>
<em class="caption">A caption.</em>
</div>
Notes Remarks

The supported possible values for caption-side depend on the orientation of the table. Horizontal tables support the top and bottom values. Vertical tables support the left and right values. Using an unsupported value for this property (for instance, left on a caption for a horizontal table) will cause the caption to appear at the “logical top” of the table. The logical top of a table depends on the writing mode of the text, and is parallel to and immediately precedes the first line of text in a table. Captions placed to the left or right of the table are not rotated so as to be read vertically. This style attribute can be applied to any element with a display style of table-caption.

Syntax

caption-side: top | bottom

Standards information See also Related articles Tables Related pages Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4