Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Adding info to the <td> tag

phpMyEdit Configuration     Adding info to the <td> tag
Odoslať novú tému   Odpovedať na tému    
 
houghi     Založený: 18.04.2008   Príspevky: 11  
Príspevok Zaslal: 2008-04-18 14:56
Návrat hore  Odpovedať s citátom     

Currently I am using something like the following:
Kód:
   if( $odd = $i%2 ){$COLOR="#E9F2F7";}else{$COLOR="";}
   $i++;
   $html[] = '<tr bgcolor="'.$COLOR.'">

This basicaly gives each line a different colour.

Where would I need to insers this/ I have looked but was unable to find just where to put it.

 
Icehawg     Založený: 09.04.2008   Príspevky: 20  
Príspevok Zaslal: 2008-04-18 23:48
Návrat hore  Odpovedať s citátom     

You don't need to do that in the class script as each alternating row gets assigned a different class so it is easier defined in the CSS.

Each cell in the first row has the suffix "-0" tagged on it. Each cell in the next row has the suffix "-1" tagged on it. They alternate between the two.

So for example put style in your page :
Kód:

<style>
td.pme-key-0, td.pme-value-0, td.pme-help-0, td.pme-cell-0 { background-color: #E9F2F7; }
   
td.pme-key-1, td.pme-value-1, td.pme-help-1, td.pme-cell-1  { background-color: #a1a1a1; }
</style>


 
houghi     Založený: 18.04.2008   Príspevky: 11  
Príspevok Zaslal: 2008-04-19 02:25
Návrat hore  Odpovedať s citátom     

Thank you very much.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov