Appliquer un style à tous les éléments d'une table
Bonjour,
Je cherche à appliquer un style à tous les éléments d'une table.
Ma commande :
Code:
document.getElementById("matable").className="normal3";
La class "normal3" :
Code:
1 2 3 4 5 6 7 8 9 10
| .normal3 {
font-family:Verdana;
font-size:11px;
font-weight:normal;
color:"#00009D"; /* Bleu */
text-decoration:none;
border-style:solid;
border-width:1px;
border-color:"#007BB7";
} |
Le code HTML :
Code:
1 2 3 4 5 6
| $ret.="<table id='table1' width='200' border='1' cellpadding='0' cellspacing='0' onmouseover='document.getElementById(\"mm_cslmunicipal\").style.visibility = \"visible\"'>";
$ret.="<tr><td width='200' height='20' onmouseover='javascript:this.style.background=\"#007BB7\";javascript:this.style.color=\"#FFFFFF\"' onmouseout='javascript:this.style.background=\"#FFFFFF\";javascript:this.style.color=\"#00009D\";' ><a href='/intranet/fenetresintranet/affich_documents.php?dossier=12' class='lien4'>Procès verbaux des conseils municipaux</a></td></tr>";
$ret.="<tr><td width='200' height='20' onmouseover='javascript:this.style.background=\"#007BB7\";javascript:this.style.color=\"#FFFFFF\"' onmouseout='javascript:this.style.background=\"#FFFFFF\";javascript:this.style.color=\"#00009D\";' ><a href='/intranet/fenetresintranet/affich_documents.php?dossier=28' class='lien4'>Liste des recueils administratifs</a></td></tr>";
$ret.="<tr><td width='200' height='20' onmouseover='javascript:this.style.background=\"#007BB7\";javascript:this.style.color=\"#FFFFFF\"' onmouseout='javascript:this.style.background=\"#FFFFFF\";javascript:this.style.color=\"#00009D\";' ><a href='/intranet/fenetresintranet/affich_documents.php?dossier=37' class='lien4'>Calendriers des conseils municipaux</a></td></tr>";
$ret.="<tr><td width='200' height='20' onmouseover='javascript:this.style.background=\"#007BB7\";javascript:this.style.color=\"#FFFFFF\"' onmouseout='javascript:this.style.background=\"#FFFFFF\";javascript:this.style.color=\"#00009D\";' >Liste des élus</td></tr>";
$ret.="</table>"; |
La bordure de la table est bleue mais le style ne s'applique pas aux cellules de la table.
Quelqu'un a t'il une idée ?:)