Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a233a40428f424d3

Jump to content

Template talk:Sticky table start

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Remove vertical scroll

[edit]

Talk split from Template talk:Sticky header#Incompatible with overflow:auto. Jroberson108 (talk) 22:03, 18 September 2025 (UTC)Reply

Thanks Timeshifter! I am extremely reluctant to use {{sticky table start}}, because that has the effect of making it harder to see the table, even on large screens. I guess it is a pick your poison situation... hmmm. Would it be possible to get a version of {{sticky table start}} with only the horizontal scrolling? HouseBlaster (talk • he/they) 20:07, 18 September 2025 (UTC)Reply

@HouseBlaster and Timeshifter: This {{sticky header}} is supposed to "stick to the top of the screen", not a scrollable div. You will have issues if in a scrollable div and the sticky site header is also present. {{sticky table start}} makes it stick to the div edge. Seems like this conversation is more related to the other template now, so maybe it needs to be moved there? Can you explain "harder to see the table, even on large screens" and "only the horizontal scrolling"? Vertical scroll only shows if the table height is greater than the div's height, which is currently "max-height: 75vh;" or 75% vertical height. It might can be increased to 80vh or 85vh, but I recall Timeshifter said 75vh was easier for him. I don't recall my preference, but it was probably 85vh or 90vh, which was minimal room to tap above/below a table on mobile to scroll past it without having to scroll through the entire table height to the bottom. No broader discussion was had about it, but mobile has to be considered with the change due to the lack of a mouse and scroll wheel or persistent page scrollbar. Jroberson108 (talk) 21:08, 18 September 2025 (UTC)Reply
I mean that, to see the entire table, on larger screens you are forced to scroll within the {{sticky table start}} div, if that makes sense? As opposed to scrolling down the page. I believe that makes it harder to see the full thing than it would otherwise be. By "only the horizontal scrolling", I mean that {{sticky table start}} would not limit the vertical height of the table, but would allow the equivalent of overflow-x:scroll;. Apologies that my wording was unclear; I am not a CSS wizard... Best, HouseBlaster (talk • he/they) 21:15, 18 September 2025 (UTC)Reply
@HouseBlaster: If a tall table extends past the visible page's height, you would still have to scroll on the page scrollbar if the div scrollbar were not there. Is your issue that you can't continuously scroll using the page scrollbar, but have to switch to the div scrollbar for the table, like when source editing an article? So, increasing the div's height even to 100% of the visible page will not solve your frustration? What about on mobile, do you also prefer to not have a div vertical scrollbar?
Removing the height would completely change how the template works, which would need a larger discussion IMO. Although it would have similar issues to Template:Sticky header#Known issues, I would have to test to see if any additional issues occur. As it is now, this template has less issues. If others don't want to change it, then I might be able to come up with some styles to add to your user common.css file to remove the height and shift it below the site's top sticky bar when it appears. Jroberson108 (talk) 22:17, 18 September 2025 (UTC)Reply
You explained my position better than I could—my issue is the lack of continuous scrolling. I don't think removing the height from the existing {{sticky table start}} would be a good idea (I would oppose that), but perhaps creating a new {{sticky header with horizontal scrolling start}} (name TBD) template. Best, HouseBlaster (talk • he/they) 22:34, 18 September 2025 (UTC)Reply
Having a third version of these sticky templates doesn't sound ideal since it seems like a preference of having or not having a vertical scrollbar. What's to stop someone from switching the template used on an article just because it is their personal preference, then having long discussions on why one is better than the other? Best to see what the majority want and, assuming no real issues, change the template accordingly. If there is a real need for both, then that can be discussed.
I have heard some similar complaints about this template, although no real discussion was had to find out what exactly they disliked. As I recall, originally {{sticky header}} was to be replaced by this one, but I think some users preferred the other template for certain circumstances, especially if the table is not wide and has no need for a horizontal scroll, although they may not have considered smaller mobile screens. Jroberson108 (talk) 23:05, 18 September 2025 (UTC)Reply
@HouseBlaster and Timeshifter: I went ahead and tested to see if it is possible, and it doesn't seem so. The div has an overflow style, which makes the column header want to stick to it, not the top of the page. The div is needed so the row headers left-stick to it and a wide table is contained within the main content area and doesn't overflow beyond it messing up the layout. Jroberson108 (talk) 23:27, 18 September 2025 (UTC)Reply
Thank you for investigating! Not sure which poison to use for {{user access levels}}... I guess we have plenty of time to decide. HouseBlaster (talk • he/they) 02:52, 19 September 2025 (UTC)Reply
@HouseBlaster: For that table, I don't see a need for left sticky row headers since the table isn't too wide and a lot of the columns are easy-to-read check symbols, which means either template can be used IMO. I would recommend adding {{sort under}} to narrow the table so that it at least fits in the main content area. Since that table is pretty much the only content on the page, I'm more inclined to use {{sticky header}}. If you had several large tables, then I might lean towards {{sticky table start}}. It being a template, I'm not sure how it will be used on other pages, like if in the middle of several other large tables, so decide accordingly. Jroberson108 (talk) 14:46, 19 September 2025 (UTC)Reply
It is used at WP:UAL#Table, where it is wrapped in overflow:auto. I've added {{sort under}}. Best, HouseBlaster (talk • he/they) 18:53, 19 September 2025 (UTC)Reply
@HouseBlaster: I removed overflow so sticky headers work. Don't need overflow if the headers are always visible. Jroberson108 (talk) 19:58, 19 September 2025 (UTC)Reply

Row borders

[edit]

I am using sticky tables at this article and have applied two row styles on each of the table: style="font-weight:bold" and style="border-top:3px solid darkgray". Whilst the former works, the latter does not. I have used this in tables without sticky headers without any problem. Is this a bug with this template or have I done something wrong? Obi2canibe (talk) 17:49, 11 January 2026 (UTC)Reply

@Obi2canibe: Borders disappear in some browsers when the headers are sticky due to wikitable's collapsed borders. This template attempts to fix borders. See bug, which was marked as duplicate in favor of the other. Jroberson108 (talk) 18:42, 11 January 2026 (UTC)Reply

Multi columns sticky

[edit]

Is there a way to make multiple columns in a table sticky at the same time (e.g., the first two)?
My request refers to the following table on Olympic sports. Below is a small excerpt in which the problem might become apparent if you select only one column as stick.

  • as example, column 2 is selected as sticky and the cells in this column have also the "sticky-table-left" parameter to fix otherweise overlapping issues:
Sport Discipline Code & Pictogram Body 96 00 04 06 08 12 20 24 28 32 36 48 52 56 60 64 68 72 76 80 84 88 92 96 00 04 08 12 16 20 24 28
Aquatics Artistic swimming SWA World Aquatics 2 2 2 1 2 2 2 2 2 2 2 2
Diving DIV 2 1 2 4 5 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 8 8 8 8 8 8 8 8
Marathon swimming OWS 2 2 2 2 2 2
Swimming SWM 4 7 9 4 6 9 10 11 11 11 11 11 11 13 15 18 29 29 26 26 29 31 31 32 32 32 32 32 32 35 35 41
Water polo WPO 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2
Archery ARC World Archery 7 6 3 10 2 2 2 2 4 4 4 4 4 4 4 4 5 5 6
Athletics ATH World Athletics 12 23 25 21 26 30 29 27 27 29 29 33 33 33 34 36 36 38 37 38 41 42 43 44 46 46 47 47 47 48 48 48
Badminton BDM BWF 4 5 5 5 5 5 5 5 5 5
Baseball and softball Baseball BBL WBSC[s 1] 1 1 1 1 1 1 1
Softball SBL 1 1 1 1 1 1

Miria~01 (talk) 23:19, 12 February 2026 (UTC)Reply

@Miria~01: Multiply can stick to the top due to sortable moving those headers to the thead element, but there is no tleft element. Jroberson108 (talk) 19:17, 13 February 2026 (UTC)Reply

Sticky columns without vertical scroll

[edit]

Want to encapsulate large tables by making the 1st col sticky but disable the vertical div wrapper so it is only horizontally scrollable without hiding the table's visible content by height. Can this be done? 8rz (talk) 02:30, 23 February 2026 (UTC)Reply

@8rz: If your table is short enough, the vertical scroll won't show. See Template:Sticky table start/testcases#Test sticky wikitable short and wide. Are you saying you have a table with row headers and no column headers, so you only need left sticky and no top sticky? Jroberson108 (talk) 06:19, 23 February 2026 (UTC)Reply
@Jroberson108:, Referring to tables on the following pages:
Yes, only need left sticky. The sticky-col1 class would do, right?
Side note: does sticky header support sticky cols or is it sticky row(s) only? 8rz (talk) 11:46, 23 February 2026 (UTC)Reply
@8rz: This appears to be the widest table: Tennis performance timeline comparison (women) (1884–1977)#1884–1900. Yes, you can make just column 1 left sticky, although there are column headers too that should be top sticky due to the height of the table. The scrollable container can't be removed since it is needed for the elements to stick to.
Some improvements on the table. The WIM/USA row should be column headers too. All column headers can use scope="col" while the years would use scope="colgroup". If you are being thorough, use scope="row" on the row headers with an optional table class of plainrowheaders. Making the table sortable would be helpful too and make it possible for the multi-row column headers to be top sticky. If making it sortable, you can use {{sort under}} to make it narrower. Some alignment was moved from the rows/cells to the table element.
Here's a sample of the changes where a taller table would have top sticky headers in the scrollable container.
Player 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900
WIM WIM WIM WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA WIM USA OLY
United Kingdom of Great Britain and Ireland Maud Watson W W F A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
United Kingdom of Great Britain and Ireland Lillian Watson F 1R QF A A A A A A A A A A A A A A A A A A A A A A A A A A A A A
Jroberson108 (talk) 20:30, 23 February 2026 (UTC)Reply
Shame the container can't be expanded. Maybe increase the vh unit? I'd steer away from making the tables sortable for the sole reason to not fat finger the wikilinks while trying to sort (such tables don't need to be sortable). Thanks for the help. 8rz (talk) 20:39, 23 February 2026 (UTC)Reply
@8rz: Fat fingering the link was a concern on mobile in the development of {{sort under}}, and enough space was added to help prevent it, as far as we've tested. Never had issues with mouse clicks. We also played around with larger vh units on this template, but was an issue on mobile for some when trying to scroll past the table. Jroberson108 (talk) 20:50, 23 February 2026 (UTC)Reply
As someone who edits only on mobile sans cca. 15 edits on PC, fat fingering said links on desktop version on mobile can be very, very annoying. That is why I a big proponent for unlinked colheaders in conjunction with sorting arrows (side-by-side or under). 8rz (talk) 21:17, 23 February 2026 (UTC)Reply
  1. Cite error: The named reference WBSC was invoked but never defined (see the help page).
Cite error: There are <ref group=s> tags on this page, but the references will not show without a {{reflist|group=s}} template (see the help page).