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.
| A | B | C |
<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.
| A | B | C |
<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-*Small≥640px
md:cs-*Medium≥768px
lg:cs-*Large≥1024px
xxl:cs-*Extra Large≥1536px
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-*