Forum de discussion
Forum « Programmation Javascript » (archives)
this.style.background + image ???
Envoyé: 2 juin 2004, 21h19 par yom17
j'ai un menu à paramétrer
impossible de mettre un background d'image sur mes liens.
j'ai essayé background-image(url) et rien à fair ............un vrais casse tête
je vous donne mes sources en espérant que vous trouviez :
MERCI
imageback='navigation.jpg';
bgcolor='#ffffff';
posXmenu = 1;
posYmenu = 0;
document.write('<style type="text/css">');
document.write('#topgauche { position:absolute; top:'+posYmenu+'px; left:'+posXmenu+'px; z-index:10; }');
document.write('</style>');
function kill(){sknvert.visibility = "hidden";
}
document.onclick = kill;
document.write('<DIV ID=topgauche><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=173 ><TR><TD ><TABLE CELLPADING=8 CELLSPACING=1 BORDER=0 WIDTH=100% HEIGHT=20 >')
document.write('<a HREF="accueil2.html" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="accueil2.html" target="fenetre" > Accueil</A></TD></TR></A>')
document.write('<a HREF="expositions2.html" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="expositions2.html" target="fenetre" > Expositions</A></TD></TR></A>')
document.write('<a HREF="expo_recents/index.php3" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="expo_recents/index.php3" target="fenetre" > Oeuvres récentes <br><br><img src="images/pinceau2.gif" height="35" border=0 ><br></A></TD></TR></A>')
document.write('<a HREF="expo/index.php3" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="expo/index.php3" target="fenetre" > Rétrospectives </A></TD></TR></A>')
document.write('<a HREF="biographie2.html" target="fenetre"><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="biographie2.html" target="fenetre"> Biographie </A></TD></TR></A>')
document.write('<a HREF="valide.html" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="valide.html" target="fenetre" > Contact</A></TD></TR></A>')
document.write('<a HREF="http://www.site.fr" target="_blank"><TR valign=middle><TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="http://www.site.fr" target="_blank" > Webmaster </A></TD></TR></A>')
document.write('<a HREF="guestbook.html" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="guestbook.html" target="fenetre" > <img src="images/webmaster_266.gif" height="10" border=0 > Livre d\'Or</A></TD></TR></A>')
document.write('<a HREF="liens2.html" target="fenetre" ><TR valign=middle> <TD WIDTH=173 HEIGHT=20 style="cursor:pointer; cursor:hand" background='+imageback+' onMouseOver="this.style.background=\''+bgcolor+'\'" onMouseOut="this.style.background=\''+imageback+'\'" ><a HREF="liens2.html" target="fenetre"> Liens </A></TD></TR></A>')
document.write('</TABLE></TD></TR></TABLE></DIV>')
Réponses
|