User:Timeshifter/Sandbox119

Scrollable table below now has sticky header row that stays visible while scrolling. See also:
 * Template:COVID-19 pandemic death rates

See also: User:Timeshifter/Sandbox118

Modeled on this template:
 * Template:COVID-19 pandemic data

Trying to only use its external style sheet:
 * Template:COVID-19 pandemic data/styles.css

At first I had to add this to get the country column text to align left: The only part of the CSS from the link just above that was needed: /* styling for first column */ .covid19-deathbycountry tr>:first-child { text-align:left; }
 * Template:COVID-19 pandemic death rates by country/styles.css

A variation of it has been added to Template:COVID-19 pandemic data/styles.css /* Column of country names left aligned when names are in first column. */ /* For John Hopkins table. */ .covid19-countrynames tr>:first-child { text-align:left; }

So now the sandbox table, and the template table work fine. See i:
 * Template talk:COVID-19 pandemic death rates

Table is updated by copying just the data wikitext (no header wikitext) from here: Hidden notes in the template below show where to copy and paste the data wikitext.
 * Template:COVID-19 pandemic death rates by country

has been removed from the caption. Non-breaking spaces are now in the date: 5 September 2020. Caption goes to 2 lines when zoomed high enough. Caption still disappears when scrolling. Regardless of the caption length, at a high enough zoom level the table extends beyond its scrollbox size horizontally. This happens when the header words are wide enough. These words: confirmed, population. Also, the country names.

Scrollable table with sticky header row
 