User:Quantum7/sandbox#Alternating-color sortable tables
{{User sandbox}}
{{divbox|grey|Grey box|Some like it british.}}
Signatures
Alternating-color sortable tables
Manually endering row colors for each row breaks sorting & makes it hard to insert/delete/reorder elements. For instance, sorting the following table breaks the coloring.
class="sortable wikitable" border="0" align="center" style="border: 1px solid #999; background-color:#FFFFFF" | ||||||
align="left" bgcolor="#CCCCCC"
! NAME ! Description | Class | Type | Flexible | Link | Author | Year |
MAMMOTH
| MAtching Molecular Models Obtained from Theory | Cα | Pair | No | [http://ub.cbm.uam.es/mammoth/ server] [http://predictioncenter.org/local/mammoth.txt download] | CEM Strauss & AR Ortiz | 2002 |
-bgcolor="#EFEFEF"
| CE/CE-MC | Combinatorial Extension -- Monte Carlo | Cα | Multi | No | [http://cl.sdsc.edu/ server] | I. Shindyalov | 2000 |
DaliLite
| Distance Matrix Alignment | C-Map | Pair | No | [http://ekhidna.biocenter.helsinki.fi/dali_server/start server] | L. Holm | 1993 |
-bgcolor="#EFEFEF"
| TM-align | TM-score based protein structure alignment | Cα | Pair | nil | [http://zhanglab.ccmb.med.umich.edu/TM-align server and download] | Y. Zhang & J. Skolnick | 2005 |
Adding the following code to Special:mypage/common.css will make the following table color properly in all sorting instances:
table.alternating tr:nth-child(even) {
background:#EFEFEF;
}
class="sortable wikitable alternating" border="0" align="center" style="border: 1px solid #999; background-color:#FFFFFF" | ||||||
align="left"
! NAME ! Description | Class | Type | Flexible | Link | Author | Year |
MAMMOTH
| MAtching Molecular Models Obtained from Theory | Cα | Pair | No | [http://ub.cbm.uam.es/mammoth/ server] [http://predictioncenter.org/local/mammoth.txt download] | CEM Strauss & AR Ortiz | 2002 |
CE/CE-MC
| Combinatorial Extension -- Monte Carlo | Cα | Multi | No | [http://cl.sdsc.edu/ server] | I. Shindyalov | 2000 |
DaliLite
| Distance Matrix Alignment | C-Map | Pair | No | [http://ekhidna.biocenter.helsinki.fi/dali_server/start server] | L. Holm | 1993 |
TM-align
| TM-score based protein structure alignment | Cα | Pair | nil | [http://zhanglab.ccmb.med.umich.edu/TM-align server and download] | Y. Zhang & J. Skolnick | 2005 |
Hidden boxes
{{Hidden|Basic|Body}}
{{hidden|Code|
code
code
code}}
{{hidden begin|title=2-part}}
code
code
code
{{hidden end}}