CSS/Properties/caption-side
From W3C Wiki
< CSS | Properties
Contents |
caption-side
The caption-side property specifies the position of the caption box with respect to the table box.
Description
| Values | top | bottom | inherit |
|---|---|
| Initial value | top |
| Applies to | 'table-caption' elements |
| Inherited | Yes |
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.
Example
Example A
[style.css]
table{
border-width: 1px;
border-style: solid;
border-collapse: collapse;
width: 400px;
}
tr, th, td{
border-width:1px;
border-style: solid;
}
caption{
caption-side: bottom;
}
[index.html]
<body>
<table>
<caption>Figure 1-1. CSS property</caption>
<tr>
<th>Values</th>
<td>top | bottom | inherit</td>
</tr>
<tr>
<th>Initial value</th>
<td>top</td>
</tr>
<tr>
<th>Applies to</th>
<td>table-caption elements</td>
</tr>
<tr>
<th>Inherited</th>
<td>Yes</td>
</tr>
</table>
</body>
CSS Reference
The CSS specification defines the caption-side property in 17.4.1 Caption position and alignment.

