Bonjour je voudrais mettre une image de fond dans une table via mon css.
('TABLE.fondtxt{BACKGROUND-IMAGE:urlbouton\fondbouton.gif);border:3px}')
Pb cela ne fonctionne pas y compris "border:3px"
j'ai cree une ligne special ou j'ai simplement mis la class=fondtxt
" document.write('<TABLE class=fondtxt CELLPADING=0 CELLSPACING=1 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center ><FONT color=white SIZE=2 FACE="Verdana"><B>ACCUEIL</B></FONT></TD></tr></table><br>')"
mais rien n'y fait.
voici le script que j'ai recupere et qui fonctionne (sauf mon background :-))
*********************************
bgcolor='#00008b';
bgcolor2='#6666ff';
document.write('<style type="text/css">');
document.write('.popper { POSITION: absolute; VISIBILITY: hidden; z-index:15; left:99px ')
document.write('#topgauche { position:absolute; z-index:10; }')
document.write('A:hover.ejsmenu {color:#FFFFFF; text-decoration:none;}')
document.write('.ejsmenu {color:#ffffff; text-decoration:none;}')
document.write('TABLE.fondtxt{BACKGROUND-IMAGE:url(bouton\fondbouton.gif);border:3px}')
document.write('</style>')
document.write('<div style="position:relative;height:25"><DIV class=popper id=topdeck></DIV>');
zlien = new Array;
zlien[0] = new Array;
zlien[1] = new Array;
zlien[2] = new Array;
zlien[3] = new Array;
zlien[4] = new Array;
zlien[5] = new Array;
zlien[6] = new Array;
zlien[7] = new Array;
zlien[0][0] = '<A HREF="accueil.asp" CLASS=ejsmenu>Accueil</A>';
zlien[1][0] = '<A HREF="Nous.asp" CLASS=ejsmenu>Nous</A>';
zlien[1][1] = '<A HREF="Nous1.asp" CLASS=ejsmenu>Le Gérant</A>';
zlien[2][0] = '<A HREF="credo.asp" CLASS=ejsmenu>Credo</A>';
zlien[3][0] = '<A HREF="activites.asp" CLASS=ejsmenu>Activités</A>';
zlien[4][0] = '<A HREF="decentralise.asp" CLASS=ejsmenu>Décentralisée</A>';
zlien[4][1] = '<A HREF="durable.asp" CLASS=ejsmenu>Durable</A>';
zlien[4][2] = '<A HREF="partenaires.asp" CLASS=ejsmenu>Partenariat</A>';
zlien[5][0] = '<A HREF="journal.asp" CLASS=ejsmenu>Journal</A>';
zlien[6][0] = '<A HREF="contact.asp" CLASS=ejsmenu>Contact</A>';
zlien[7][0] = '<A HREF="club.asp" CLASS=ejsmenu>Club Excellence</A>';
if(document.getElementById)
{
skn = document.getElementById("topdeck").style
skn.left = 99;
}
function pop(msg,pos)
{
skn.visibility = "hidden";
a=true
skn.top = pos;
var content ="<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR=#000000 WIDTH=150><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=1>";
pass = 0
while (pass < msg.length)
{
content += "<TR><TD BGCOLOR="+bgcolor+" onMouseOver=\"this.style.background='"+bgcolor2+"'\" onMouseOut=\"this.style.background='"+bgcolor+"'\" HEIGHT=20><FONT SIZE=2 FACE=\"Verdana\"><B> "+msg[pass]+"</B></FONT></TD></TR>";
pass++;
}
content += "</TABLE></TD></TR></TABLE>";
document.getElementById("topdeck").innerHTML = content;
skn.visibility = "visible";
}
function kill()
{
if(document.getElementById)
skn.visibility = "hidden";
}
document.onclick = kill;
if(document.getElementById)
{
/*
document.write('<DIV ID=topgauche><TABLE BORDER=2 CELLPADDING=0 CELLSPACING=0 WIDTH=100 HEIGHT=160><TR><TD>')
*/
document.write('<DIV ID=topgauche>')
document.write('<TABLE class=fondtxt CELLPADING=0 CELLSPACING=1 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center ><FONT color=white SIZE=2 FACE="Verdana"><B>ACCUEIL</B></FONT></TD></tr></table><br>')
document.write('<TABLE class=fondtxt CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[0],0)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>ACCUEIL</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[1],20)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>NOUS</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[2],40)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>CREDO</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[3],60)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>ACTIVITES</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[4],80)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>COOPERATION</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[5],100)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>JOURNAL</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[6],120)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>CONTACT</B></FONT></TD></tr></table><br>')
document.write('<TABLE CELLPADING=0 CELLSPACING=1 BORDER=0 WIDTH=110 HEIGHT=30><tr><TD WIDTH=100 ALIGN=center BGCOLOR='+bgcolor+' onMouseOver="this.style.background=\''+bgcolor2+'\';pop(zlien[7],140)" onMouseOut="this.style.background=\''+bgcolor+'\'" CLASS=ejsmenu><FONT color=white SIZE=2 FACE="Verdana"><B>CLUB EXCELLENCE</B></FONT></TD></tr></table><br>')
/*
document.write('</TABLE></TD></TR></TABLE></DIV>')
*/
document.write('</DIV>')
}
document.write('</div>');
*********************************
d'avance merci
Partager