Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Rispettare le misure di "height" su tabella

    Salve,
    come si fa per fare rispettare le due misure "height" assegnate alla tabella dell'esempio qui sotto ?

    le due misure di "height:150px" si allargano come gli piace di più e non mantengono le misure date....

    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>MyTitle</title>
    <style type="text/css">
    html,body
    {
    	height:100%;
    }
    body
    {
    	margin:0px;
    	padding:0px;
    }
    html
    {
    	position:relative;
    }
    </style>
    </head>
    <body>
    <table style="width:100%; height:100%" border="1">
      <tr>
        <td style="height:150px"></td>
      </tr>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td style="height:150px"></td>
      </tr>
    </table>
    </body>
    </html>

  2. #2
    Utente di HTML.it L'avatar di marty89
    Registrato dal
    Apr 2011
    Messaggi
    107
    Ciao, prova a dare "overflow: hidden;" e "float: left;" al tag <td>. In questo modo l'altezza dovrebbe rimanere sempre la stessa.
    Nota che overflow può assumere tanti valori: visible, hidden, scroll e auto. Uso quello che fa al caso tuo.

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.