Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Background colors set for rows  



1.1  Without class=mw-datatable  





1.2  With class=mw-datatable  







2 Background colors set for individual cells  





3 Template sets colors for individual cells  














User:Timeshifter/Sandbox152

















User page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
User contributions
User logs
View user groups
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< User:Timeshifter

  • See: T284802: class=mw-datatable should not override the inline background colors set for specific table rows.
  • See: T287997: Community expectation that mw-datatable styles are loaded on pages which use it
  • Background colors set for rows

    [edit]

    This table excerpt is from the "Top scorers" section of this versionofDenmark men's national handball team. It is common in many sport statistics tables to add a background color to some of the rows. In this table excerpt

      still active national team players are highlighted

    I want to be able to add class=mw-datatable to such tables, but not lose those background colors.

    Without class=mw-datatable

    [edit]

    Return to top.

    {| class="wikitable sortable static-row-numbers" border=1 style=text-align:center

    Player Goals Average Position Years
    Lars Christiansen 1503 4.45 W 1992–2012
    Mikkel Hansen 1099 5.02 OB 2007–
    Erik Veje Rasmussen 1015 4.37 OB 1980–1993
    Michael V. Knudsen 797 3.27 P 1999–2014
    Hans Lindberg 755 2.79 W 2003–

    With class=mw-datatable

    [edit]

    Return to top.

    {| class="wikitable sortable static-row-numbers mw-datatable" border=1 style=text-align:center

    Player Goals Average Position Years
    Lars Christiansen 1503 4.45 W 1992–2012
    Mikkel Hansen 1099 5.02 OB 2007–
    Erik Veje Rasmussen 1015 4.37 OB 1980–1993
    Michael V. Knudsen 797 3.27 P 1999–2014
    Hans Lindberg 755 2.79 W 2003–

    Background colors set for individual cells

    [edit]

    Return to top.

    This is for testing.

    {| class="wikitable sortable static-row-numbers" border=1 style=text-align:center

    Player Goals Average Position Years
    Lars Christiansen 1503 4.45 W 1992–2012
    Mikkel Hansen 1099 5.02 OB 2007–
    Erik Veje Rasmussen 1015 4.37 OB 1980–1993
    Michael V. Knudsen 797 3.27 P 1999–2014
    Hans Lindberg 755 2.79 W 2003–

    Template sets colors for individual cells

    [edit]

    Return to top.

    This is for testing.

    This is adapted from List of countries by intentional homicide rate. See template: {{ccolor}}

    {| class="wikitable sortable static-row-numbers sort-under" border=1 style=text-align:right

    Country or subnational area Rate Count Year listed
     Burundi 6.02 635 2016
     Comoros 7.70 60 2015
     Djibouti 6.48 60 2015

    Retrieved from "https://en.wikipedia.org/w/index.php?title=User:Timeshifter/Sandbox152&oldid=1211059289"





    This page was last edited on 29 February 2024, at 17:03 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki