bonjour
je joins deux fichiers images qui montrent le problème et le résultat voulu pour un alignement d'images, chaque éléments est une image
voici l'écriture du code, la troisième colonne td commence au bas de la deuxième ...!!??
merci LJalign.zip
je joins deux fichiers images qui montrent le problème et le résultat voulu pour un alignement d'images, chaque éléments est une image
voici l'écriture du code, la troisième colonne td commence au bas de la deuxième ...!!??
Code PHP:
$result .= table width='90%' cellspacing='0' cellpadding='0';
foreach ($label_array as $key = $value) {
$result .= tr;
$result .= td width='40%' align='left';
switch ($value) {
case 'a'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXA1'). $b_label kWhm².an );';
break;
case 'b'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $b_label .JText_('DPE_BOXA'). $c_label .JText_('DPE_KWH'). );';
break;
case 'c'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $c_label .JText_('DPE_BOXA'). $d_label .JText_('DPE_KWH').n );';
break;
case 'd'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $d_label .JText_('DPE_BOXA'). $e_label .JText_('DPE_KWH'). );';
break;
case 'e'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $e_label .JText_('DPE_BOXA'). $f_label .JText_('DPE_KWH'). );';
break;
case 'f'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $f_label .JText_('DPE_BOXA'). $g_label .JText_('DPE_KWH'). );';
break;
case 'g'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . .gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXG'). $g_label kWhm².an );';
break;
default
break;
}
$result .= td;
$result .= td width='10%' align='center';
switch ($value) {
case 'a'
if ($reskwh = $b_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXA1'). $b_label kWhm².an );';
break;
case 'b'
if ($reskwh $b_label && $reskwh = $c_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $b_label .JText_('DPE_BOXA'). $c_label .JText_('DPE_KWH'). );';
break;
case 'c'
if ($reskwh $c_label && $reskwh = $d_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $c_label .JText_('DPE_BOXA'). $d_label .JText_('DPE_KWH'). );';
break;
case 'd'
if ($reskwh $d_label && $reskwh = $e_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $d_label .JText_('DPE_BOXA'). $e_label .JText_('DPE_KWH'). );';
break;
case 'e'
if ($reskwh $e_label && $reskwh = $f_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $e_label .JText_('DPE_BOXA'). $f_label .JText_('DPE_KWH'). );';
break;
case 'f'
if ($reskwh $f_label && $reskwh = $g_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $f_label .JText_('DPE_BOXA'). $g_label .JText_('DPE_KWH'). );';
break;
case 'g'
if ($reskwh $g_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXG'). $g_label kWhm².an );';
break;
default
break;
}
}
foreach ($label_array as $key = $value) {
$result .= td width='40%' align='left';
switch ($value) {
case 'a'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXA1'). $bco2_label kgCo2m².an );';
break;
case 'b'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $bco2_label .JText_('DPE_BOXA'). $cco2_label .JText_('DPE_CO2'). );';
break;
case 'c'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $cco2_label .JText_('DPE_BOXA'). $dco2_label .JText_('DPE_CO2'). );';
break;
case 'd'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $dco2_label .JText_('DPE_BOXA'). $eco2_label .JText_('DPE_CO2'). );';
break;
case 'e'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $eco2_label .JText_('DPE_BOXA'). $fco2_label .JText_('DPE_CO2'). );';
break;
case 'f'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $fco2_label .JText_('DPE_BOXA'). $gco2_label .JText_('DPE_CO2'). );';
break;
case 'g'
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 1.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXG'). $gco2_label kgCo2m².an );';
break;
default
break;
}
$result .= td;
$result .= td width='10%' align='center';
switch ($value) {
case 'a'
if ($resco2 = $bco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXA1'). $bco2_label kgCo2m².an );';
break;
case 'b'
if ($resco2 $bco2_label && $resco2 = $cco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $bco2_label .JText_('DPE_BOXA'). $cco2_label .JText_('DPE_CO2'). );';
break;
case 'c'
if ($resco2 $cco2_label && $resco2 = $dco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $cco2_label .JText_('DPE_BOXA'). $dco2_label .JText_('DPE_CO2'). );';
break;
case 'd'
if ($resco2 $dco2_label && $resco2 = $eco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $dco2_label .JText_('DPE_BOXA'). $eco2_label .JText_('DPE_CO2'). );';
break;
case 'e'
if ($resco2 $eco2_label && $resco2 = $fco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $eco2_label .JText_('DPE_BOXA'). $fco2_label .JText_('DPE_CO2'). );';
break;
case 'f'
if ($resco2 $fco2_label && $resco2 = $gco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXDE'). $fco2_label .JText_('DPE_BOXA'). $gco2_label .JText_('DPE_CO2'). );';
break;
case 'g'
if ($resco2 $gco2_label)
$result .= img src=' . JURIbase() . componentscom_objectifcarboneimages . $value . 2.gif' height='25' onClick='javascriptalert(.JText_('DPE_BOX'). . $key . .JText_('DPE_BOXG'). $gco2_label .JText_('DPE_CO2'). );';
break;
default
break;
}
$result .= td;
$result .= tr;
$result .= table;
Commentaire