Rechercher : dans
Par :

Espacer les cellules d'un tableau (CSS)

Maria, le 30 jun 2009 à 15:51:29 
 Signaler ce message aux modérateurs

Bonjour,

J'ai un petit problème tout bête ... Je souhaiterais espacer les cellules d'un tableau afin que l'on voie la couleur du background entre chaque. J'ai essayé avec la commande border-spacing, a marche pô ... :( J'espère que vous pourrez m'aider ...

Voici le code html du tableau :

<table style="margin-left: 40%;" border="0" cellpadding="0" cellspacing="0" >
	<tbody>
	<tr>
    <td class="whitecell" type="text" ><b>Home</b></td>
	<td class="blackcell" type="text" >Bespreking</td>
    <td class="blackcell" type="text" >Wysig</td>
	<td class="blackcell" type="text" >History</td>
	</tr>
	</tbody>
	</table>




Et le code CSS associé :

.whitecell {
	height: 30px;
	font-size: 13px;
	color: red;
	margin-left: 100px;
	color: #000000;
	background-color: #ffffff;
	width: 50px;
	text-align: center;
}
.blackcell {
	background: #000000;
	font-size: 13px;
	margin-left: 15px;
	color: #f7941e;
	height: 30px;
	width: 50px;
	text-align: center;
}
table{
	border-spacing:2px;
}



Merci beaucoup de l'aide que vous pourrez m'apporter :)
Configuration: Windows XP
Firefox 3.0.11

Collection CommentÇaMarche.net