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="w-full bc-slate bw-1 bs-d bc-c ta-c"> <caption class="bg-black cs-t"> Top Caption </caption> <tbody> <tr> <td class="p-3 bc-slate c-slate bw-1 bs-d">A</td> <td class="p-3 bc-slate c-slate bw-1 bs-d">B</td> <td class="p-3 bc-slate c-slate bw-1 bs-d">C</td> </tr> </tbody></table>Bottom
Display the caption below the table.
| A | B | C |
<table class="w-full bc-slate bw-1 bs-d bc-c ta-c"> <caption class="bg-black cs-b"> Bottom Caption </caption> <tbody> <tr> <td class="p-3 bc-slate c-slate bw-1 bs-d">A</td> <td class="p-3 bc-slate c-slate bw-1 bs-d">B</td> <td class="p-3 bc-slate c-slate bw-1 bs-d">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-*