Visualizzazione dei risultati da 1 a 2 su 2

Discussione: tabella con 2 form

  1. #1
    Utente di HTML.it L'avatar di las
    Registrato dal
    Apr 2002
    Messaggi
    1,221

    tabella con 2 form

    Salve a tutti,

    Ho una tabella con 2 form form, con un codice come questo:

    codice:
    <form name="form1" action="link.php" >
    <table>
      <thead>
        <tr>
          <th><input type="submit" name="invia" value="Invia" /></th>
          <th><input type="text" name="campo2" value="prova2" /></th>
        </tr>
      </thead>
    </form>
    <form name="form2" action="link2.php" >
      <tbody>
        <tr>
          <td><input type="text" name="campo1" value="prova" /></td>
          <td><input type="text" name="campo2" value="prova2" /></td>      
        </tr>
        <tr>
          <td><input type="text" name="campo3" value="prova3" /></td>
          <td><input type="text" name="campo4" value="prova4" /></td>      
        </tr>
        <tr>
          <td colspan="2">
            <input type="submit" name="Invia" values="Invia" />
          </td>
        </tr>
      </tbody>
    </form>
    </table>
    Con Firefox funziona tutto perfettemente, mentre con IE a livello funzionale è tutto apposto, ma la tabelle viene formattata male, le colonne dalla seconda riga (in pratica dal body) non sono allineate con quelle dell'intestazione.

    Come bisognerebbe scrivere per fare in modo che non sfasi le colonne?

    Grazie a tutti


  2. #2
    codice:
    <table>
    <form name="form1" action="link.php" >
      <thead>
        <tr>
          <th><input type="submit" name="invia" value="Invia" /></th>
          <th><input type="text" name="campo2" value="prova2" /></th>
        </tr>
      </thead>
    </form>
    <form name="form2" action="link2.php" >
      <tbody>
        <tr>
          <td><input type="text" name="campo1" value="prova" /></td>
          <td><input type="text" name="campo2" value="prova2" /></td>      
        </tr>
        <tr>
          <td><input type="text" name="campo3" value="prova3" /></td>
          <td><input type="text" name="campo4" value="prova4" /></td>      
        </tr>
        <tr>
          <td colspan="2">
            <input type="submit" name="Invia" values="Invia" />
          </td>
        </tr>
      </tbody>
    </form>
    </form>
    </table>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.