Originariamente inviato da Mich_
Mi sembra strano che non funzioni nemmeno in FF.
Quale DTD stai usando?
Prova ad aggiungere anche:
max-width: 100px;
Invece in IE quirks mode non funziona. Se invece usi lo standard mode (cioe` con la DTD XHTML 1.0 strict) anche IE dovrebbe comportarsi come FF e gli altri.
Sto usando XHTML Strict.
Aggiungendo il max-width funziona su FF ma non su IE. Su quest'ultimo il la cella prende la giusta larghezza si allunga in altezza (senza considerare l'overflow) e mi mette il testo su due o pių righe.
Ti allego un test...
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>prova</title>
<style type="text/css">
#tabella1 {
border: 1px solid silver;
/*width: 85%;*/
}
#tabella1 th, #tabella1 td.ragsoc {
width: 50px;
max-width: 50px;
}
#tabella1 th {
background-color: #C8C8C8;
padding: 0.3em;
line-height: 1.3em;
}
#tabella1 td {
padding: 0.2em;
}
#tabella1 td.ragsoc {
overflow: hidden;
white-space: nowrap;
}
</style>
</head>
<body>
<table id="tabella1">
<thead>
<tr>
<th nowrap width='100%'>R.Soc</th>
<th nowrap width='100%'>Altro</th>
</tr>
</thead>
<tbody>
<tr class='tr_pari'>
<td class="ragsoc">Ragione sociale molto lunga Spa</td>
<td class="nome">Pippo</td>
</tr>
</tbody>
</table>
</body>
</html>