Bước tới nội dung

Thành viên:Huy91/Nháp/1

Bách khoa toàn thư mở Wikipedia
  • {{Sticky top}}
  • {{Sticky start}}

This template adds a scrollable container around a table and its classes can be used to make the table's rows stick to the top or the columns stick to the left side of the container as the table's data is scrolled in and out of view.

It's used on tall and/or wide tables that have headers that might be difficult to remember as you scroll through the data. It keeps very wide tables within the main content area's width so the layout of Wikipedia's desktop version remains intact.

Using this template without any classes puts a table in a scrollable box without sticky headers. If there is a need for a horizontal-only scroll window (for example with a wide table where sticky headers would be too large, and some rows are very tall) see: Help:Table#Overflowing tables.

Usage Thành viên:Huy91/Nháp/1

Include {{sticky table start}} above and {{sticky table end}} below the table. Add any of the following as needed.

Table classes

Classes for table start wikitext: {| class="class1 class2".
ClassSummary
sticky-table-headMake the table head top sticky. Don't combine with sticky-table-rowN. Requires sortable table, which moves consecutive top header rows into the <thead> (table head) HTML element. Rows using the sorttop class become sticky after sorting (issue: T355492). Avoid making headers sticky that aren't for the entire table (ex. section header rows). Avoid making excessively tall header rows sticky that might block too much data on short screens (ex. mobile landscape).
sticky-table-rowNMake row N top sticky where N is a number from 1 to 2. Limit 1 to avoid stacking issues where a taller row 1 is still visible. Don't combine with sticky-table-head. Unpredictable results if the row spans or is spanned with the rowspan attribute.
sticky-table-colNMake column N left sticky where N is a number from 1 to 2. Limit 1 to avoid stacking issues where a wider column 1 is still visible. Unpredictable results if the column spans or is spanned with the colspan attribute. Avoid making an excessively wide column sticky that might block too much data on narrow screens (ex. mobile portrait).

Cell classes

Classes for cell wikitext: ! class="class1 class2" |
or | class="class1 class2" |.
ClassSummary
sticky-table-noneRemove sticky from cell in cases where rowspan causes an issue. For example, a sticky column using rowspan will have some cells that are sticky in the next column. See usage example. Usage search.
sticky-table-leftAdd left sticky to cell in cases where rowspan causes an issue. For example, column 1 using rowspan with a sticky column 2 will have some cells in column 2 that are not sticky and some in column 3 that are sticky. See usage example. Usage search.

Sticky row 1 and column 1 Thành viên:Huy91/Nháp/1

Note: Also works if the table uses the sortable class.

{{Sticky table start}}{| class="wikitable sticky-table-row1 sticky-table-col1"|}{{Sticky table end}}
Caption
Header 1Header 2Header 3Header 4Header 5Header 6Header 7Header 8Header 9Header 10Header 11Header 12Header 13Header 14Header 15Header 16Header 17Header 18Header 19Header 20Header 21Header 22Header 23Header 24Header 25Header 26
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata

Sticky head and column 1 Thành viên:Huy91/Nháp/1

Note: The sticky-table-head class requires the table to use the sortable class so the column header rows are moved to the <thead> element.

The "Header 2" cell uses the sticky-table-none class to fix the left sticky issue caused by the "Header 1" cell's rowspan.

For illustration purposes, a background color has been added to the table:

  • yellow for sticky-table-none
{{Sticky table start}}{| class="wikitable sortable sticky-table-head sticky-table-col1"|+ Caption|-! rowspan="2" | Header 1! colspan="4" | Header group 1|-! class="sticky-table-none" | Header 2! Header 3 !! Header 4 !! Header 5 !!|}{{Sticky table end}}
Caption
Header 1Header group 1Header group 2Header group 3Header group 4
Header 2Header 3Header 4Header 5Header 6Header 7Header 8Header 9Header 10Header 11Header 12Header 13Header 14Header 15Header 16Header 17Header 18Header 19Header 20
toptoptoptoptoptoptoptoptoptoptoptoptoptoptoptoptoptoptoptop
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
bottombottombottombottombottombottombottombottombottombottombottombottombottombottombottombottombottombottombottombottom

Usage of sticky-table-none and sticky-table-left Thành viên:Huy91/Nháp/1

The header rows are top sticky and the second column is left sticky. When making a column left sticky and rowspan messes up what is sticky, the sticky-table-none and sticky-table-left classes can be used to fix it.

The "Header 1" and "Header 2" cells use rowspan meaning their content exists on row 1, not row 2, which causes an incorrect cell on row 2 to be left sticky. Adding the sticky-table-none class to that cell on row 2 removes left sticky. A similar occurrence is fixed in the same way due to the first cell under "Header 2" using rowspan and causing the second cell under "Header 3" to be left sticky.

A more complex issue is the third cell under "Header 1" using rowspan and causing a cell in column 3 of the next row to be left sticky instead of the one in column 2. Adding the sticky-table-left and sticky-table-none classes to the appropriate cells will add and remove left sticky, respectively.

For illustration purposes, background colors have been added to the table:

  • yellow for sticky-table-none
  • orange for sticky-table-left
{{Sticky table start}}{| class="wikitable sortable sticky-table-head sticky-table-col2"|-! rowspan="2" | Header 1! rowspan="2" | Header 2! colspan="3" | Header group 1 !!|-! Header 3! class="sticky-table-none" | Header 4! Header 5 !!|-| data| rowspan="2" | data| data |||-| data| class="sticky-table-none" | data| data |||-| rowspan="2" | data| data |||-| class="sticky-table-left" | data| class="sticky-table-none" | data| data || …⫶|}{{Sticky table end}}
Header 1Header 2Header group 1Header group 2Header group 3Header group 4
Header 3Header 4Header 5Header 6Header 7Header 8Header 9Header 10Header 11Header 12Header 13Header 14Header 15Header 16Header 17Header 18Header 19Header 20
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata
datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata

Example with sticky head and column 1 Thành viên:Huy91/Nháp/1

Adapted from List of U.S. state and territory abbreviations § Table. Narrow your browser window to see left sticky column below.

The column 1 "Name" and column 2 "Status of region" cells in row 1 use rowspan to span into row 2. When making column 1 left sticky, this makes the first cell in row 2, the empty sorting cell under "ISO", left sticky, so the sticky-table-none class is added to that cell.

{{sticky table start}}{{Row hover highlight}}{|class="wikitable sortable sticky-table-head sticky-table-col1 mw-datatable"|+ Codes and abbreviations for U.S. states, federal district, territories, and other regions! rowspan=2 | [[List of states and territories of the United States|Name]]! rowspan=2 | Status of region! [[ISO 3166|ISO]]! colspan=2 | [[#ANSI standard INCITS 38:2009|ANSI]]! [[#Postal codes|USPS]]! [[#Coast Guard vessel prefixes|USCG]]! rowspan=2 | [[#GPO|GPO]]! rowspan=2 | [[#Current use of traditional abbreviations|AP]]! rowspan=2 | Other <br>abbreviations|-! class= sticky-table-none | !! !! !! !! &nbsp;|}{{sticky table end}}
Codes and abbreviations for U.S. states, federal district, territories, and other regions
NameStatus of regionISOANSIUSPSUSCGGPOAPOther
abbreviations
 
Hoa Kỳ United States of AmericaFederal stateUS
USA
840
US00U.S.U.S.U.S.A.
Alabama AlabamaStateUS-ALAL01ALALAla.Ala.
Alaska AlaskaStateUS-AKAK02AKAKAlaskaAlaskaAk.
Arizona ArizonaStateUS-AZAZ04AZAZAriz.Ariz.
Arkansas ArkansasStateUS-ARAR05ARARArk.Ark.
California CaliforniaStateUS-CACA06CACFCalif.Calif.Cal.
Colorado ColoradoStateUS-COCO08COCLColo.Colo.
Connecticut ConnecticutStateUS-CTCT09CTCTConn.Conn.
Delaware DelawareStateUS-DEDE10DEDLDel.Del.
Washington, D.C. District of ColumbiaFederal districtUS-DCDC11DCDCD.C.D.C.Dis. Col.
Florida FloridaStateUS-FLFL12FLFLFla.Fla.
Georgia GeorgiaStateUS-GAGA13GAGAGa.Ga.Geo.
Hawaii HawaiiStateUS-HIHI15HIHAHawaiiHawaiiHi.; Haw.
Idaho IdahoStateUS-IDID16IDIDIdahoIdahoIda.
Illinois IllinoisStateUS-ILIL17ILILIll.Ill.
Indiana IndianaStateUS-ININ18ININInd.Ind.
Iowa IowaStateUS-IAIA19IAIAIowaIowaIoa.
Kansas KansasStateUS-KSKS20KSKAKans.Kan.Ka.
Kentucky KentuckyState (officially Commonwealth)US-KYKY21KYKYKy.Ky.Ken., Kent.
Louisiana LouisianaStateUS-LALA22LALALa.La.
Maine MaineStateUS-MEME23MEMEMaineMaine
Maryland MarylandStateUS-MDMD24MDMDMd.Md.Mar., Mary.
Massachusetts MassachusettsState (officially Commonwealth)US-MAMA25MAMSMass.Mass.
Michigan MichiganStateUS-MIMI26MIMCMich.Mich.
Minnesota MinnesotaStateUS-MNMN27MNMNMinn.Minn.
Mississippi MississippiStateUS-MSMS28MSMIMiss.Miss.
Missouri MissouriStateUS-MOMO29MOMOMo.Mo.
Montana MontanaStateUS-MTMT30MTMTMont.Mont.
Nebraska NebraskaStateUS-NENE31NENBNebr.Neb.
Nevada NevadaStateUS-NVNV32NVNVNev.Nev.
New Hampshire New HampshireStateUS-NHNH33NHNHN.H.N.H.
New Jersey New JerseyStateUS-NJNJ34NJNJN.J.N.J.N. Jersey
New Mexico New MexicoStateUS-NMNM35NMNMN. Mex.N.M.New M., New Mex.
Bản mẫu:Country data New York (state) New YorkStateUS-NYNY36NYNYN.Y.N.Y.N. York
Bắc Carolina North CarolinaStateUS-NCNC37NCNCN.C.N.C.N. Car.
Bắc Dakota North DakotaStateUS-NDND38NDNDN. Dak.N.D.
Ohio OhioStateUS-OHOH39OHOHOhioOhioO., Oh.
Oklahoma OklahomaStateUS-OKOK40OKOKOkla.Okla.
Oregon OregonStateUS-OROR41OROROreg.Ore.
Pennsylvania PennsylvaniaState (officially Commonwealth)US-PAPA42PAPAPa.Pa.Penn., Penna.
Rhode Island Rhode IslandStateUS-RIRI44RIRIR.I.R.I.R.I. & P.P.
Nam Carolina South CarolinaStateUS-SCSC45SCSCS.C.S.C.S. Car.
Nam Dakota South DakotaStateUS-SDSD46SDSDS. Dak.S.D.SoDak
Tennessee TennesseeStateUS-TNTN47TNTNTenn.Tenn.
Texas TexasStateUS-TXTX48TXTXTex.Texas
Utah UtahStateUS-UTUT49UTUTUtahUtahUt.
Vermont VermontStateUS-VTVT50VTVTVt.Vt.Verm.
Virginia VirginiaState (officially Commonwealth)US-VAVA51VAVAVa.Va.Virg.
Bản mẫu:Country data Washington (state) WashingtonStateUS-WAWA53WAWNWash.Wash.Wn.
Tây Virginia West VirginiaStateUS-WVWV54WVWVW. Va.W.Va.W.V., W. Virg.
Wisconsin WisconsinStateUS-WIWI55WIWSWis.Wis.Wisc.
Wyoming WyomingStateUS-WYWY56WYWYWyo.Wyo.
Samoa thuộc Mỹ American SamoaInsular area (Territory)AS
ASM
016
US-AS
AS60ASASA.S.
Guam GuamInsular area (Territory)GU
GUM
316
US-GU
GU66GUGUGuam
Quần đảo Bắc Mariana Northern Mariana IslandsInsular area (Commonwealth)MP
MNP
580
US-MP
MP69MPCMM.P.CNMI
Puerto Rico Puerto RicoInsular area (Commonwealth)PR
PRI
630
US-PR
PR72PRPRP.R.
Quần đảo Virgin thuộc Mỹ U.S. Virgin IslandsInsular area (Territory)VI
VIR
850
US-VI
VI78VIVIV.I.U.S.V.I.
U.S. Minor Outlying IslandsInsular areasUM
UMI
581
US-UM
UM74UM
Baker IslandIslandUM-8181XB
Howland IslandIslandUM-8484XH
Jarvis IslandIslandUM-8686XQ
Johnston AtollAtollUM-6767XU
Kingman ReefAtollUM-8989XM
Midway AtollAtollUM-7171QM
Navassa IslandIslandUM-7676XV
Palmyra AtollAtollUM-9595XL
Wake IslandAtollUM-7979QW
Quần đảo Marshall Marshall IslandsFreely associated stateMH
MHL
584
MH68MH
Liên bang Micronesia MicronesiaFreely associated stateFM
FSM
583
FM64FM
Palau PalauFreely associated statePW
PLW
585
PW70PW
U.S. Armed Forces – AmericasUS military mail codeAA
U.S. Armed Forces – EuropeUS military mail codeAE
U.S. Armed Forces – PacificUS military mail codeAP
Nebraska NebraskaObsolete postal codeNB
Quần đảo Bắc Mariana Northern Mariana IslandsObsolete postal codeCM
Bản mẫu:Country data Panama Canal Zone Panama Canal ZoneObsolete postal codePZ
PCZ
594
CZ
Philippines Philippine IslandsObsolete postal codePH
PHL
608
PI
Bản mẫu:Country data Trust Territory of the Pacific Islands Trust Territory of the Pacific IslandsObsolete postal codePC
PCI
582
TT

Example with sticky row 2 and column 2 Thành viên:Huy91/Nháp/1

Adapted from WTA 1000 Series singles records and statistics § Title leaders. Narrow your browser window to see left sticky column below.

Note: The column 1 "Titles", "Player", and "Years" cells have their rowspan removed and the cells moved from row 1 to row 2 to facilitate making row 2 top sticky. Because row 1 is hidden when row 2 is sticky, the other cells in row 2 have a background color to visually relate them to the "Active tournaments" and "Defunct tournaments" parent cells in row 1. The two cells in row 1 are kept for screen readers instead of moving them to a legend. Doing this helps reduce the amount of top sticky content: 1 row instead of 2.

The "10", "9", "6", and "5" cells in the "Titles" column 1 use rowspan. When making column 2 left sticky, cells in the spanned rows have column 2 not left sticky and column 3 left sticky, so the sticky-table-left and sticky-table-none classes are added to those column 2 and column 3 cells, respectively.

{{mw-datatable}}{{sort under}}{{sticky table start}}{| class="wikitable mw-datatable sortable sort-under-center sticky-table-row2 sticky-table-col2" style="text-align:center"|-! scope="row" rowspan="3" |10|style="text-align:left" | {{sort|Henin.|{{flagg|uxx|BEL}} [[Justine Henin]]}}| -| -⫶|-|style="text-align:left; background-color:#FFFFE0;" class="sticky-table-left" | {{sort|Azarenka.|{{flagg|uxx|BLR}} '''[[Victoria Azarenka]]'''}}*| class="sticky-table-none" | -| style="background-color:#B9FF72;" |2*⫶|-|style="text-align:left; background-color:#FFFFE0;" class="sticky-table-left" | {{sort|Świątek.|{{flagg|uxx|POL}} '''[[Iga Świątek]]'''}}*| class="sticky-table-none" | -| style="background-color:#B9FF72;" |2*⫶|}{{sticky table end}}
  • CA (Canadian Open)
  • CH (Charleston Open)
  • CI (Cincinnati Open)
  • CN (China Open)
  • DU (Dubai Championship)
  • FL (Virginia Slims of Florida)
  • GE (German Open)
  • IT (Italian Open)
  • IW (Indian Wells Open)
  • KC (Kremlin Cup)
  • MA (Madrid Open)
  • MI (Miami Open)
  • PH (Virginia Slims of Philadelphia)
  • PP (Pan Pacific Open)
  • QA (Qatar Open)
  • SD (San Diego Open)
  • WU (Wuhan Open)
  • ZU (Zurich Open)
*  Active players.
*  Most titles won per tournament.

Bản mẫu:Sort under

Title leaders
Active tournamentsDefunct tournaments
TitlesPlayerDUQAIWMIMAITCACIWUCNFLCHGESDPHKCPPZUYears
23 Serena Williams--2*8*24*32*-1-1------1999–2016
17 Martina Hingis--12-22----2*1--15*11997–2007
15 Steffi Graf--13--2---1*15*-1*-1-1990–1996
14 Maria Sharapova-12*-13-1-1---2*--212005–2015
11 Lindsay Davenport--2*----------1--44*1997–2005
10 Justine Henin--1---2----2*3----22002–2007
Victoria Azarenka*-2*2*3---2*-1--------2009–2020
Iga Świątek*-2*2*113---1--------2021–2024
9 Conchita Martínez-----4*-----2*2-1*---1993–2000
Monica Seles---2-24*-----1-----1990–2000
Venus Williams*2*--3-1--1--1-----11998–2015
Simona Halep*111-213-----------2014–2022
Petra Kvitová*-1-13*-1-2*-------1-2011–2023
7 Kim Clijsters--2*2-111----------2003–2010
6 Arantxa Sánchez Vicario---2-12----1------1992–1996
Amélie Mauresmo-----22-----2-----2001–2005
Jelena Janković--1--2-1---1---1--2007–2010
Caroline Wozniacki*1-1---1--2*------1-2010–2018
Aryna Sabalenka*-1--2--12*---------2018–2024
5 Gabriela Sabatini-----2----1*2*------1991–1992
Mary Pierce-----1-----1-1-2*--1997–2005
Dinara Safina----111-----1---1-2008–2009
Agnieszka Radwańska---1--1--2*------1-2011–2016

Note: The asterisks (*) are used because screen readers can not see cell background colors.

Note: Header glossary is needed since on mobile there isn't a way to hover on abbreviated text. {{abbr}}

Note: In article namespace in dark mode the links in colored cells are underlined black links. See:

  • Help:Table/Advanced#Color contrast of links in dark mode and the previous sections.

Line height and cell phones Thành viên:Huy91/Nháp/1

Adding style="line-height: 0.96;" to the table allows more rows to be visible in the scrolling window.

{{sticky table start}}{| class="wikitable sortable sticky-table-head" style="line-height: 0.96;"

The scrolling window limits what can be seen in the vertical direction, especially in cell phone viewports.

With style="line-height:X;" the number is important. Too small, and adjacent lines of text, or even rows, will touch in some places in narrow screens, or wide tables. Too large, and rows will be taller than necessary. Look at the tables here in your cell phone to see what works, and what does not work.

Vertical headers for wide tables Thành viên:Huy91/Nháp/1

Note: In the case of smaller cell phones like the iPhone SE 2020 this is an example of what not to do. The top headers with sorting icons are too tall in landscape view. It is not possible to see the height of a full row below the header. And the left sticky column is too wide for portrait view. So {{Sticky header}} should be used instead. It allows the table to be viewed in portrait view since there is no scroll window, no left sticky, and there is more room for the tall top header. {{Sticky header}} may or may not be working in cell phones when you are reading this. See page of narrow sticky tables for testing in cell phones, etc.

Adapted from Opinion polling on the second Donald Trump administration. Note that line breaks <br> may be placed in vertical headers. Note that if using a 2-column vertical header there must be at least one cell below it with a minimum of 3 characters. See {{vertical header}} for more info and tips.

! {{vertical header|Criminal justice<br>reform}}
February 2025
Poll sourceDateSample
size
MoE
Overall
Abortion
Civil liberties
Crime
Criminal justice
reform
Economy/Jobs
Education
Environment
Foreign policy
Guns
Healthcare
Immigration
Inflation/prices
Israel/Hamas/
Palestine
Managing federal
government
National security
Russia-Ukraine
Trade/Tariffs
Morning ConsultFebruary 21–24, 20252,225 RV± 2.0%+3%−6%+7%+8%+4%+18%+17%+6%
The Economist/YouGovFebruary 9–11, 20251,430 RV± 3.3%+3%+6%+2%+1%+1%+1%+7%−6%+5%
Washington Post/IpsosFebruary 13–18, 20252,177 RV± 2.1%−3%−3%+9%−5%
Quinnipiac UniversityFebruary 13–17, 20251,039 RV± 3.0%−3%−4%−4%−3%−9%−4%−7%
GallupFebruary 3–16, 20251,004 A± 4.0%−6%−12%−9%−5%−11%−6%−11%
Echelon InsightsFebruary 10–13, 20251,010 LV± 3.6%+6%+4%+4%+12%−2%−5%
The Economist/YouGovFebruary 9–11, 20251,430 RV± 3.3%−2%−8%+6%+1%−9%−4%−12%−7%
YouGov/CBSFebruary 5–7, 20252,175 A± 2.5%+6%+8%
The Economist/YouGovFebruary 2–4, 20251,423 RV± 3.3%,+1%−2%+11%+4%+1%−6%+8%−3%
Navigator ResearchJan 30–Feb 3, 20251,000 RV± 3.1%+2%+1%
The Economist/YouGovJanuary 26–28, 20251,376 RV± 3.3%+4%−8%−5%+10%+12%−10%+4%+6%
Quinnipac UniversityJanuary 23–27, 20251,019 RV± 3.1%+3%+1%

Known issues Thành viên:Huy91/Nháp/1

  • Tables using this template cannot be edited with VisualEditor (VE) due to unbalanced HTML (split open/close tags). Use source editing (the "Edit source" tab) instead. For more details, see VE Limitations and Why not to use the VE.
  • When {{Anchor}} (or a similar anchor mechanism; see WP:ANCHOR) is used to link to a part of a top-sticky table, the link's target is moved to the top of the page behind the top-sticky elements. The target can be partially or fully covered depending on the height of the target and the top-sticky elements.
  • Setting a table's width to a percentage that is less than 100% (i.e. style="width:50%;") will add space between the right side of the table and the vertical scroll bar. This is not the case when the width is set to pixels or em units. Generally, you should avoid setting the table's width so it stays responsive for the various displays (i.e. desktop vs mobile). More at Help:Table/Width.

See also Thành viên:Huy91/Nháp/1

  • Help:Table/Advanced § Scrolling tables with sticky column and row headers
  • {{sticky header}} - Makes column headers stick to the top of the page while scrolling through table data.
  • {{shy}} – Can be used to help narrow columns by adding a soft hyphen to a word to allow it to wrap.
  • Help:Table/Advanced#Colors in tables

More template styles for tables:

  • {{sort under}} - moves the sorting arrows under the headers.
  • {{row hover highlight}} - adds row hover highlighting, and option for white background.
  • {{static row numbers}} - adds a column of row numbers to a table.
  • {{table alignment}} - aligns the cells in a column, or a whole table.

Cách sử dụng Thành viên:Huy91/Nháp/1