Anomalia grandezza automatica celle tabella

di il
2 risposte

Anomalia grandezza automatica celle tabella

Salve raga, ho un problema nella grandezza automatica delle celle di una tabella solo su alcune righe: Ecco il codice

//ciclo su vigneti 
for($i=1; $i<=3; $i++){ ?>

 <form action="nota-consulenza.php" method="GET">
 <table style="border: 1px solid black; table-layout:auto; width:100%; border-collapse:auto;">
 <tr style="background:#00bb2d; border-bottom: 1px solid #000000; border-right: 1px solid #000000;">
  <td style= "border-bottom: 1px solid;"><input style="text" name="vigneto<?php echo $i; ?>" placeholder="Inserire Vigneto" ></td>
 </tr>
 <tr style="border-bottom: 1px solid #000000; border-right: 1px solid #000000;">
  <td style= "border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Sostanza Attiva</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;" ><strong>Nome Commerciale</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000; "><strong>Listino</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Dose Etichetta (g/hl) </strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Dose Consigliata (kg/l/a) </strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;" ><strong>CONC. PRODOTTO</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Dose da Utilizzare</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>CONC. PRODOTTO</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Dose Ettolitro</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Dose Acqua (hl/ha)</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Costo Prodotto (€/kg)</strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Costo Trattamento (€/ha) </strong></td>
  <td style ="border-bottom: 1px solid #000000; border-right: 1px solid #000000; border-top: 1px solid #000000;"><strong>Costo Copertura Giornaliera €/gg</strong></td>
 </tr>
 <?php for ($j = 1; $j <= 6; $j++) { ?>
 <tr>
   <td>
   <select name="sostattiva<?php echo $i.$j ?>" id="sostattiva<?php echo $i.$j ?>">
	<option value="0">Selezionare Sostanza Attiva</option>
    <?php //seleziono elementi vigneto 1 e riempio la select
    $sqlvigna1 = "SELECT * FROM db_medicinali_copy";
    $result1 = mysqli_query($conn, $sqlvigna1);
    while ($row1 = $result1->fetch_assoc()){ 
        $sost1 = $row1['sostanzaattiva']; 
        echo '<option value="'.$sost1.'">'.$sost1.'</option>'; 
    } ?>
   </select>

   </td> 
    
   <!-- Nome Commerciale -->
   <td>
    <select name="commerciale<?php echo $i.$j ?>" id="commerciale<?php echo $i.$j ?>">
	  <option value="0">Selezionare Nome Commerciale</option>
      <?php //seleziono elementi vigneto 1 e riempio la select
       $sqlvigna1 = "SELECT * FROM db_medicinali_copy";
       $result1 = mysqli_query($conn, $sqlvigna1);
       while ($row1 = $result1->fetch_assoc()){ 
        $comm1 = $row1['nome_commerciale']; 
        echo '<option value="'.$comm1.'">'.$comm1.'</option>'; 
       } 
	  ?>
    </select>
   </td>

   <!-- Listino -->
   <td>
    <select name="listino<?php echo $i.$j ?>" id="listino<?php echo $i.$j ?>">
    </select>
   </td>
   
   <!-- Dose g/hl -->
   <td>
    <select name="doseghl<?php echo $i.$j ?>" id="doseghl<?php echo $i.$j ?>">
    </select>
   </td>

   <!-- Dose consigliata -->
   <td>
   <select name="dosecon<?php echo $i.$j ?>" id="dosecon<?php echo $i.$j ?>">
     
   </select>
   </td>   

   <!-- CONC. PRODOTTO -->
   <td>
    <select name="conct<?php echo $i.$j ?>" id="conct<?php echo $i.$j ?>">
    </select>
   </td>
   
   <!-- Dose da utilizzare -->
   <td style="background: #00bb2d;">
     <input type="textbox" name ="dosedaut<?php echo $i.$j ?>" id ="dosedaut<?php echo $i.$j ?>" placeholder="Inserire Dose">
   </td>

   <!-- CONC. PRODOTTO -->
   <td class="conctd">
    <select name="conctd<?php echo $i.$j ?>" id="conctd<?php echo $i.$j ?>">
    </select>
   </td>

   <!--Dose Ettolitro -->
   <td>
    <select name="hlettaro<?php echo $i.$j ?>" id="hlettaro<?php echo $i.$j ?>">
	
    </select>
   </td>

   <!-- Dose acqua -->
   <td style="background: #00bb2d;">
     <input type="textbox" name ="doseacqua<?php echo $i.$j ?>" id ="doseacqua<?php echo $i.$j ?>" placeholder="Inserire Dose Acqua">
   </td>

   <!-- Costo Prodotto Kg/€ -->
   <td>
    <select name="coskgeu<?php echo $i.$j ?>" id="coskgeu<?php echo $i.$j ?>">
	   
    </select>
   </td>

   <!-- Costo Trattamento €/ha -->
   <td>
    <select name="costratta<?php echo $i.$j ?>" id="costratta<?php echo $i.$j ?>">
    </select>
   </td>

   <!-- Costo Copertura 30gg -->
   <td>
    <select name="coscop<?php echo $i.$j ?>" id="coscop<?php echo $i.$j ?>">
      <option value="0">Selezionare Costo Copertura</option>
    </select>
   </td>
   

 </tr>
 
</table>
<br/><br/>

<?php } //chiusura 1° ciclo for ?>
Ecco il link della pagina: "app.danielebarisano.it/vigneto/medicina.php" Come potete notare, solo sulla 1°riga di ognuna delle 3 tabelle si imposta la grandezza cella in automatico in base al contenuto. Nelle altre no.

Sapete dirmi il perchè trattandosi dello stesso codice?

2 Risposte

Devi accedere o registrarti per scrivere nel forum
2 risposte