<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://itg.nls.uk/index.php?action=history&amp;feed=atom&amp;title=Template%3ASticky_header%2Fdoc</id>
	<title>Template:Sticky header/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://itg.nls.uk/index.php?action=history&amp;feed=atom&amp;title=Template%3ASticky_header%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://itg.nls.uk/index.php?title=Template:Sticky_header/doc&amp;action=history"/>
	<updated>2026-05-26T16:13:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://itg.nls.uk/index.php?title=Template:Sticky_header/doc&amp;diff=155&amp;oldid=prev</id>
		<title>MikeSaunders: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://itg.nls.uk/index.php?title=Template:Sticky_header/doc&amp;diff=155&amp;oldid=prev"/>
		<updated>2023-11-02T13:09:28Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:09, 2 November 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>MikeSaunders</name></author>
	</entry>
	<entry>
		<id>https://itg.nls.uk/index.php?title=Template:Sticky_header/doc&amp;diff=154&amp;oldid=prev</id>
		<title>wikipedia&gt;Timeshifter: &quot;It only works with sortable tables.&quot; Moved to top so I am less likely to forget it again. :</title>
		<link rel="alternate" type="text/html" href="https://itg.nls.uk/index.php?title=Template:Sticky_header/doc&amp;diff=154&amp;oldid=prev"/>
		<updated>2023-10-17T12:48:14Z</updated>

		<summary type="html">&lt;p&gt;&amp;quot;It only works with sortable tables.&amp;quot; Moved to top so I am less likely to forget it again. :&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{uses TemplateStyles|Template:Sticky header/styles.css}}&lt;br /&gt;
&lt;br /&gt;
This adds a floating, sticky header to a table in desktop view, but not on cell phones. &amp;#039;&amp;#039;&amp;#039;It only works with sortable tables.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It has been tested, and works, in these browsers: &amp;#039;&amp;#039;&amp;#039;Firefox, Edge, Chrome, Opera.&amp;#039;&amp;#039;&amp;#039; Header borders are missing in &amp;#039;&amp;#039;&amp;#039;Firefox.&amp;#039;&amp;#039;&amp;#039; For more info see: &amp;#039;&amp;#039;&amp;#039;[[Help:Table#Tables with sticky headers]]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It works with simple one-line headers, and with complex, multi-line, multi-row headers that use colspan and rowspan in the headers.&lt;br /&gt;
&lt;br /&gt;
See [[Special:WhatLinksHere/Template:Sticky header|list of articles]] transcluding {{tlc|sticky header}}. See [https://templatecount.toolforge.org/index.php?lang=en&amp;amp;namespace=10&amp;amp;name=Sticky_header#bottom transclusion count]. &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; See &amp;#039;&amp;#039;&amp;#039;[[User:Timeshifter/Sandbox230#Single-row_header|sandbox with examples]].&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{{tlc|sticky header}}&amp;#039;&amp;#039;&amp;#039; just above the table wikitext. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;class=sticky-header&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; to the top line of the table wikitext along with &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;class=sortable&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. For example:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;syntaxhighlight lang=wikitext&amp;gt;&lt;br /&gt;
{{sticky header}}&lt;br /&gt;
{| class=&amp;quot;wikitable sortable sticky-header&amp;quot;&lt;br /&gt;
⫶&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:inline-table; border: 2px solid lime; padding: 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;With sticky template&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{{sticky header}}&lt;br /&gt;
{| class=&amp;quot;wikitable sortable sticky-header&amp;quot; &lt;br /&gt;
|+ rowspan and colspan&lt;br /&gt;
|-&lt;br /&gt;
! rowspan=2 | Name&lt;br /&gt;
! colspan=3 style=max-width:8em | Data columns are below&lt;br /&gt;
|- &lt;br /&gt;
! 1&lt;br /&gt;
! 2&lt;br /&gt;
! 3&lt;br /&gt;
|- {{sort row|4}}&lt;br /&gt;
| Name1 || 1-1 || 2-1 || 3-1&lt;br /&gt;
|-&lt;br /&gt;
| Name2 || 1-2 || 2-2 || 3-2&lt;br /&gt;
|-&lt;br /&gt;
| Name3 || 1-3 || 2-3 || 3-3&lt;br /&gt;
|-&lt;br /&gt;
| Name4 || 1-4 || 2-4 || 3-4&lt;br /&gt;
|-&lt;br /&gt;
| Name5 || 1-5 || 2-5 || 3-5&lt;br /&gt;
|-&lt;br /&gt;
| Name6 || 1-6 || 2-6 || 3-6&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Special cases ==&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; See &amp;#039;&amp;#039;&amp;#039;[[User:Timeshifter/Sandbox230#Single-row_header|sandbox with examples]].&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Sometimes a single-row sticky header is required due to subsection table header rows within the table.&amp;#039;&amp;#039;&amp;#039; Note placement of &amp;#039;&amp;#039;&amp;#039;&amp;lt;code&amp;gt;class=sticky&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039; below. Scroll down well into the table to see that the headers before subsections of the table do not stick. Those subsection headers should not stick since they change as you scroll down the table.&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: 2px solid lime; padding: 0.5em;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Wiki source excerpt:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=wikitext highlight=1,4&amp;gt;&lt;br /&gt;
{{mw-datatable}}{{sticky header}}&lt;br /&gt;
{| class=&amp;quot;wikitable sortable mw-datatable&amp;quot;&lt;br /&gt;
|+COVID-19 vaccines authorized for emergency use or approved for full use&lt;br /&gt;
|- class=sticky&lt;br /&gt;
!&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Go down to a section farther down in the &amp;#039;&amp;#039;&amp;#039;[[User:Timeshifter/Sandbox230#Single-row_header|example sandbox]]&amp;#039;&amp;#039;&amp;#039; for a &amp;#039;&amp;#039;&amp;#039;more complex table with multi-row headers,&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;table subsections.&amp;#039;&amp;#039;&amp;#039; A &amp;#039;&amp;#039;&amp;#039;different solution&amp;#039;&amp;#039;&amp;#039; was required.&lt;br /&gt;
&lt;br /&gt;
== Problems and solutions ==&lt;br /&gt;
&lt;br /&gt;
See: &amp;#039;&amp;#039;&amp;#039;[[Template talk:Sticky header]].&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It works with {{tl|static row numbers}}. But it does not work with this subtemplate: {{tl|static row numbers table}} (go there to see what to replace it with). It breaks this subtemplate: {{tl|static row numbers arrows}}. The separate sort row disappears. Use {{tl|sort row}} instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;Timeshifter</name></author>
	</entry>
</feed>