Help:Table/Advanced: Difference between revisions

Content deleted Content added
Advanced scrolling tables with sticky headers: Better example of non-covid table using it
Line 618:
Add <code><nowiki><div class="sticky-header-scroll" style="max-height:50vh"></nowiki></code> to control the scroll window height. Change "50" to other numbers for other heights.
 
== Advanced scrollingScrolling tables with sticky column and row headers ==
'''''Note:''' Sticky left-side row headers do not work correctly if table is inside a [[Template:Collapse top|collapsible show/hide box]]. See [https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:WikiProject_Tennis&oldid=1232355612#Timeshifter_table example]. ("Timeshifter's table" section)''<br>
'''''Note:''' There is [[Template talk:Sticky header#Template:Sticky table start|discussion]] about creating a simpler template.''
 
See: '''[[Template:Sticky table start]].''' It incorporates the old Covid CSS, and it is easier to use. See [[Special:WhatLinksHere/Template:Sticky table start]] for examples.
See [[Template talk:COVID-19 pandemic data/styles.css|this CSS talk page]] for help with scrolling tables that have '''both sticky column and row headers.''' See [[Talk:COVID-19 pandemic deaths/Archive 1#Scrolling versus expanded_tables|this article discussion]] too.
 
The old Covid CSS tables need to be converted to the simpler {{t|Sticky table start}}. See '''[https://global-search.toolforge.org Global Search]''' at Toolforge. Search for '''{{nowrap|"covid19-container"}}''' - in quotes. To get a list of pages worldwide containing it.
This has moved beyond COVID tables. See the top table in [https://en.wikipedia.org/w/index.php?title=List_of_U.S._states_and_territories_by_incarceration_and_correctional_supervision_rate&oldid=1236522673 this version] of [[List of U.S. states and territories by incarceration and correctional supervision rate]].
 
There are several very advanced scrolling tables (with row and column headers that stay visible and sticky while scrolling) in [[COVID-19 pandemic by country and territory]] and in [[COVID-19 pandemic deaths]]. The scrolling and sticky headers work in cell phones, too. Widest scrolling tables are on top of the list below. Narrow your browser window until you see a horizontal scroll bar. Drag it left and right to see the sticky row headers that stay visible.
Line 630 ⟶ 629:
*[[Template:2021 2nd half. Monthly cumulative COVID-19 death totals by country]]
*[[Template:2022 first half. Monthly cumulative COVID-19 death totals by country]]
These will all be converted to the new template.
 
A totally blind [[screen reader]] user noted in a discussion '''[[Talk:COVID-19 pandemic deaths/Archive 1#Scrolling versus expanded tables|here]]''' that the scrolling tables in the related article ([[COVID-19 pandemic deaths]]) were not a problem