Non sono esperto di tabelle... non le uso mai...![]()
Ne ho una come sotto che non riesco a formattare...
Vorrei gestire la larghezza della colonne, facendo in modo che il testo non vada a capo, resti su una linea e quello che eccede venga "nascosto" dall'overflow:hidden.
Come provo ad agire sul css non ottengo nessuna modifica della larghezza!!
La tab viene creata dinamicamente da php e alcune cose non sono certo di modificarle, ma se la semantica non è perfetta non mi interessa in quanto la debbono utilizzare solo poche persone...
Tnxcodice:<table id="tabella1"> <thead> <tr> <th nowrap width="100%">Ragione Sociale </th> <th nowrap width="100%">Nominativo </th> <th nowrap width="1%">Email</th> <th nowrap width="1%">Categoria</th> <th nowrap width="1%">Provincia</th> <th nowrap width="1%">X</th> <th nowrap width="1%">X</th> <th nowrap width="1%">X</th> </tr> </thead> <tbody> <tr class='tr_pari'> <td class="azienda"> Ciccio ciccio spa</p></td> <td class="nome"> Nando</p></td> <td class="email">info@cicciociccio.it</td> <td class="categoria">Una categoria</td> <td class="provincia">Terni</td> <td width="1">xx</td> <td width="1">xx</td> <td width="1">xx</td> </tr> </tbody> </table> #tabella1 { border: 1px solid silver; } #tabella1 th { background-color: #C8C8C8; padding: 0.3em; line-height: 1.3em; } #tabella1 td { height: 20px; line-height: 20px; padding: 0.2em; margin-right: 5px; } #tabella1 td.azienda { width: 100px; overflow: hidden; padding: 0.2em 0.5em 0.2em 0.5em; font-size: 0.8em; } #tabella1 td.azienda p { width: 80%; white-space: nowrap; overflow: hidden; margin: 0; padding: 0; background-color:#CCCC33 } #tabella1 td.nome { width: 100px; font-size: 0.8em; overflow: hidden; white-space: nowrap; padding: 0.2em 0.5em 0.2em 0.5em; } ... ... ...



Rispondi quotando