Version complète: sur le forum Webmaster Hub : TD et feuille de style
Webmaster Hub > Création et exploitation de Sites Internet > Les langages du Net > (X)HTML et CSS
yanne1985
salut
j'ai dans ma feuille de style

.td {
background-color: #FA8072;
border-color: White;
}

et dans la page HTML
<td class="td">

j'ai pas l'affichage comme je veux : bordures blanches
merci d'avance de votre aide
Ifmy
white et non White je pense smile.gif
yanne1985
merci
mais non cela ne marche pas même avec les couleur données en Hexadecimale
Ifmy
En même temps tu ne définis que la couleur de bordure, je ferais donc plutôt:
CODE
border: 1px solid white;
yanne1985
:nono:
j'ai essayé cette metode aussi mais encor ça n'apas marcher
Ifmy
bah je vois pas bien pourquoi certainement une question de ciblage. Donc perso ne voyant pas l'utilité de la class je ferais directement:
CODE
td {
}
Portekoi
Bonjour,

Essaie ceci :

CITATION
td {
background-color: #FA8072;
border: 1px solid white;
}


Et pour ton code :

CITATION
<td>Mon texte</td>


A bientot


Portekoi
xpatval
Et à défaut, teste aussi directement dans la balise:
HTML
<td style="background-color:#FA8072;border: 1px solid white;">...</td>

Si là ça ne fonctionne pas, il faudra nous mettre ton code en un peu plus long...

xpatval
tictact
tout simplement, c'est parceque ton fond de body n'est-il pas déjà blanc ?

fais un essai avec une autre couleur de border !!
yanne1985
merci a vous tous
si je combine

td {
background-color: #FA8072;
border: 1px solid white;
}

et

<td class="td">...</td>

car j'ai une feuille de style
et je ne veux pas l'appliquer a toutes les balises <td>
est ce que c' possible??
captain_torche
Dans ce cas, il faut spécifier dans ta feuille de style, que tu définis un nom de classe, en faisant précéder le nom par un point (.td au lieu de td).
Kalt
Au lieu d'appeler ta classe .td, appelle-la .bordureblanche ou autre...
yanne1985
j'ai cru que c resolu mais :nono:
j'ai mis le le point et cela n'a pas marcher
yanne1985
CODE

.body {
background-color: #6AB6FF;
font-family:Verdana, Arial, Helvetica, sans-serif
font-size: 12px;
color:#FFFFFF;
}
a {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:link {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:hover {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
color: #FFA600;
text-decoration: underline;
}
a:visited {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:focus {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
.form {
background-color: Aqua;
border-color: #FF6347;
font-size: 11px;
font-family: "Courier New", Courier, monospace;
color: #824800;
}
.table {
border-color: #131313;
background-color: Black;
}

.td {
border-color: #131313;
background: Black;
}

CODE

.body {
background-color: #6AB6FF;
font-family:Verdana, Arial, Helvetica, sans-serif
font-size: 12px;
color:#FFFFFF;
}
a {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:link {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:hover {
font-family: "Courier New", Courier, monospace;
font-size: 12px;
color: #FFA600;
text-decoration: underline;
}
a:visited {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
a:focus {
color: #15155E;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
text-decoration: none;
}
.form {
background-color: Aqua;
border-color: #FF6347;
font-size: 11px;
font-family: "Courier New", Courier, monospace;
color: #824800;
}
.table {
border-color: #131313;
background-color: Black;
}

.td {
border-color: #131313;
background: Black;
}
yanne1985
CODE

<html>
<head>
<title>Document sans titre</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<table width="929" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td height="115" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="897" height="115">&nbsp;</td>
</tr>
</table></td>
<td width="32"></td>
</tr>
<tr>
<td width="168" height="393" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="168" height="128" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="265">&nbsp;</td>
</tr>
</table></td>
<td width="729" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="55" height="45">&nbsp;</td>
<td width="168">&nbsp;</td>
<td width="231">&nbsp;</td>
<td width="279">&nbsp;</td>
</tr>
<tr>
<td height="24">&nbsp;</td>
<td valign="top" class="td">Nom</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="24">&nbsp;</td>
<td valign="top">Prenom</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="24"></td>
<td valign="top">E-mail</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td valign="top">Login</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td valign="top">Password</td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td valign="top">Confirmer pasword </td>
<td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="24"></td>
<td colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
<td></td>
</tr>
<tr>
<td height="180"></td>
<td>&nbsp;</td>
<td></td>
<td></td>
</tr>
</table></td>
<td></td>
</tr>
<tr>
<td height="158"></td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
Kalt
Ta définition de la classe .td est incorrecte :

CODE
Background: black;


Doit être remplacé par :

CODE
Background-color: black;


Tu l'as pourtant bien fait dans la classe .table blink.gif
jeanpierre949
la syntaxe : Background: black; est tout a fait correct c'est le shortcut de background-color et de toutes les autres proprietes de background comme -image -fixed etc...
Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'information, la mise en page et les images, veuillez cliquer ici.