Caption Side

Set the vertical position of a table caption.

Widely available

This feature is well established and works across many devices and browser versions.

Chrome
Edge
Firefox
Safari

Usage

Top

Display the caption above the table.

Top Caption

ABC
<table class="bw-1 bs-d bc-c bc-slate ta-c w-full">
<caption class="cs-t bg-black">
Top Caption
</caption>
<tbody>
<tr>
<td class="bw-1 bs-d bc-slate p-3 c-slate">A</td>
<td class="bw-1 bs-d bc-slate p-3 c-slate">B</td>
<td class="bw-1 bs-d bc-slate p-3 c-slate">C</td>
</tr>
</tbody>
</table>

Bottom

Display the caption below the table.

Bottom Caption

ABC
<table class="bw-1 bs-d bc-c bc-slate ta-c w-full">
<caption class="cs-b bg-black">
Bottom Caption
</caption>
<tbody>
<tr>
<td class="bw-1 bs-d bc-slate p-3 c-slate">A</td>
<td class="bw-1 bs-d bc-slate p-3 c-slate">B</td>
<td class="bw-1 bs-d bc-slate p-3 c-slate">C</td>
</tr>
</tbody>
</table>

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:cs-*
Small640px
md:cs-*
Medium768px
lg:cs-*
Large1024px
xxl:cs-*
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:cs-*