Visualizzazione dei risultati da 1 a 3 su 3

Discussione: css a tabella

  1. #1

    css a tabella

    sto utilizzando questo codice
    codice:
    <style type="text/css">  </style> <table id="tabella1">   <tr> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">Sfida</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">Punteggio</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">Campionato</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">Segnalazioni</td>   </tr>     </table> <table id="tabella2">  <tr> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">!T$F VS ICDB</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">2-3</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">n/d</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">n/d</td> </tr> <tr> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">!T$F VS -IV-</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">0-3</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">n/d</td> <td nowrap colspan="2" bgcolor="#FFFFFF" width=126, height=43 align="center">[b]n/d[b]</td>     </tr>         </table>
    L'unico problema mi carica l'immagine e gli taglia via i bordi,come posso decidere la grandezza della cella dal css e lo spazio tra una cella e l'altra???

  2. #2
    Utente bannato
    Registrato dal
    Sep 2009
    Messaggi
    1,737
    [list=1][*]Devi postare il codice in modo ordinato e non su un'unica riga così è illegibile e toglie la voglia di darti una mano[*]Devi postare il codice non come PHP[/list=1]
    Io non ho letto il codice per i motivi sopra ma vedo subito nel primo pezzo un errore, hai scritto:
    codice:
    #tabella1 td{background: url(blue.jpeg)width=126, height=43;
    e questo non va bene sevi scrivere:
    codice:
    #tabella1 td{background: url(blue.jpeg); width:126; height:43;
    o più semplicemente:
    codice:
    <table border="1" cellspacing="10" cellpadding="5">
      <tr>
        <td width="126" height="43"></td>

  3. #3
    Utente di HTML.it L'avatar di Prill
    Registrato dal
    Oct 2006
    Messaggi
    2,947
    Prova così. Css:
    codice:
    #tabella1 {
    	border-collapse:collapse;
    	border:1px solid #0000ff; /* modificare colore bordo*/
    	background-color: #ffffff;
    }
    #tabella1 td {
    	width:126px;
    	height:43px;
    	background-image: url(blue.jpeg);
    	text-align:center;
    	font-weight:bold;
    	padding:0;
    	white-space: nowrap;
    }
    #tabella2 {
    	border-collapse:collapse;
    	border:1px solid #0000ff; /* modificare colore bordo*/
    	background-color: #ffffff;
    }
    #tabella2 td {
    	width:126px;
    	height:43px;
    	background-image: url(red.jpeg);
    	text-align:center;
    	font-weight:bold;
    	padding:0;
    	white-space: nowrap;
    	
    }
    e poi semplicemente
    codice:
    <table id="tabella1">
       <tr>
        <td>Sfida</td> 
    	<td>Punteggio</td> 
    	<td>Campionato</td> 
    	<td>Segnalazioni</td>
       </tr>
    </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 © 2025 vBulletin Solutions, Inc. All rights reserved.