This sandbox is using ((sticky header)). I added some more table widths. Divs have been removed.

See: User:Timeshifter/Sandbox243. And: Template:Sticky header. And: Template:Sticky header/testcases.

Test sticky-header (no caption)

Wikitable:

Wikitable wikitext:

((Sticky header))
{| class="wikitable sticky-header"
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! Header 9 || Header 10 || Header 11 || Header 12 || Header 13|}

Plain table:

Plain table wikitext:

((sticky header))
{| class="sticky-header"
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! Header 9|}

Test sticky-header (no caption). Narrower tables

Plain table:

Test sticky-header (caption)

Sticky first row.

Wikitable:

Wikitable wikitext:

((sticky header))
{| class="wikitable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! Header 9|}

Plain table:

Plain table wikitext:

((sticky header))
{| class="sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! Header 9|}

Test sticky-header (sortable)

Sticky first row.

Wikitable:


Wikitable wikitext:

((Sticky header))
{| class="wikitable sortable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! Header 9 !! Header 10 !! Header 11 !! Header 12
! Header 13 !! Header 14 !! Header 15 
! class="unsortable" | Header 16
|- class="sorttop"
| top || top || top || top || top || top 
| top || top || top || top || top || top 
| top || top || top || top 
...
|- class="sortbottom"
| bottom || bottom || bottom || bottom || bottom || bottom
| bottom || bottom || bottom || bottom || bottom || bottom 
| bottom || bottom || bottom || bottom 
|}

Plain table:

Plain table wikitext:

((sticky header))
{| class="sortable sticky-header"
|+ Caption
|-
! Header !! Header 2 !! Header 3 !! Header 4
! Header 5 !! Header 6 !! Header 7 !! Header 8
! class="unsortable" | Header 9
|- class="sorttop"
| top || top || top || top || top
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom || bottom
| bottom || bottom || bottom || bottom
|}

Test sticky-header (sortable). Narrower tables

Plain table:

Test sticky-header. 2 rows. (sortable)

Sticky <thead> element.

Issues:

Wikitable:

Wikitable wikitext:

((sticky header))
{| class="wikitable sortable sticky-header"
|+ Caption
|-
! rowspan="2" | Header
! colspan="8" | Header group
|-
! Header 2 !! Header 3 !! Header 4 !! Header 5
! Header 6 !! Header 7 !! Header 8
! class="unsortable" | Header 9
|- class="sorttop"
| top || top || top || top || top
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom || bottom
| bottom || bottom || bottom || bottom
|}

Plain table:

Plain table wikitext:

((sticky header))
{| class="sortable sticky-header"
|+ Caption
|-
! rowspan="2" | Header
! colspan="8" | Header group
|-
! Header 2 !! Header 3 !! Header 4 !! Header 5
! Header 6 !! Header 7 !! Header 8
! class="unsortable" | Header 9
|- class="sorttop"
| top || top || top || top || top
| top || top || top || top
⫶
|- class="sortbottom"
| bottom || bottom || bottom || bottom || bottom
| bottom || bottom || bottom || bottom
|}

Test template static row numbers (sticky-header, no caption)

Uses ((static row numbers)) with adjusted wikitable borders.

No label:

Label:

Test template static row numbers (sticky-header, caption)

Uses ((static row numbers)) with adjusted wikitable borders.

No label:

Label:

Test template static row numbers (sticky-header, sortable)

Uses ((static row numbers)) with adjusted wikitable borders.

No label:

Label:

Test template static row numbers. 2 rows. (sticky-header, sortable)

Uses ((static row numbers)) with adjusted wikitable borders.

No label:

Label:

Padding

Padding for testing purposes.