Jump to content

User:Quantum7/Alternating

From Wikipedia, the free encyclopedia

Current Row-level coloring

[edit]

Manually entering row colors for each row breaks sorting & makes it hard to insert/delete/reorder elements. For instance, sorting the following table breaks the coloring.

NAME Description Class Type Flexible Link Author Year
MAMMOTH MAtching Molecular Models Obtained from Theory Pair No server download CEM Strauss & AR Ortiz 2002
CE/CE-MC Combinatorial Extension -- Monte Carlo Multi No server I. Shindyalov 2000
DaliLite Distance Matrix Alignment C-Map Pair No server L. Holm 1993
TM-align TM-score based protein structure alignment Pair nil server and download Y. Zhang & J. Skolnick 2005

CSS solution

[edit]

Adding the following code to common.css will make the following table color properly in all sorting instances:

 table.alternating tr:nth-child(even) {
   background:#EFEFEF;
 }
NAME Description Class Type Flexible Link Author Year
MAMMOTH MAtching Molecular Models Obtained from Theory Pair No server download CEM Strauss & AR Ortiz 2002
CE/CE-MC Combinatorial Extension -- Monte Carlo Multi No server I. Shindyalov 2000
DaliLite Distance Matrix Alignment C-Map Pair No server L. Holm 1993
TM-align TM-score based protein structure alignment Pair nil server and download Y. Zhang & J. Skolnick 2005

Discussion

[edit]