Bonjour,
J'ai un problème sur ma page htm...
Elle est composée en tableaux, avec dans le tableau du haut mon logo au centre. je souhaite aussi afficher une image de chak coté du logo, 1 à droite et 1 a goche de manière aléatoire (mais toujours 1 de chak coté).
Mon problème est que ces images s'affichent de manière aléatoire comme je le souhaite, mais pas au bon endroit...
voici mon code... je pense que le problème se situe au niveau du script, mais je ne saurais pas dire où exactement. je l'ai fait ressortie en gras pour utilité.
est-ce que quelqu'un pourrait me dire ce qui ne va pas ? Merci beaucoup d'avance
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>index</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.body {
font-size: 18px;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
color: #FFFFFF;
text-decoration: none;
font-family: Tahoma;
}
.logo {
background-image: url(logo.png);
background-repeat: no-repeat;
background-position: center center;
}
.menu {
font-family: "Blade 2", Evanescent, Neverwinter, QUAKE, Regular;
font-size: 36px;
font-variant: small-caps;
color: #CCCCCC;
text-decoration: none;
}
.bannière {
background-image: url(banniere.png);
background-repeat: no-repeat;
background-position: center center;
}
.cadre {
border: medium solid #FFFFFF;
color: #CCCCCC;
font-family: "Times New Roman", Times, serif;
font-size: 16px;
text-decoration: none;
background-image: url(cadrecopie.png);
background-repeat: repeat-y;
background-position: center top;
}
.cadregauche {
background-image: url(cadre%20gauche.png);
background-repeat: repeat-y;
background-position: right top;
}
.cadredroite {
background-image: url(cadre%20droite.png);
background-repeat: repeat-y;
background-position: left top;
}
-->
</style>
<script language="javascript">
{
document.write('<img src="vincent/'+ Math.round((Math.random()*3)+1)+ '.png" />');
document.write('<img src="chalamon/'+ Math.round((Math.random()*3)+1)+ '.png" />');
}
</script>
</head>
<body background="fondbis.jpg">
<table width="100%" height="210" border="0" cellpadding="0" cellspacing="0" class="bannière">
<tr>
<td colspan="2"> </td>
<td width="21%" rowspan="3"><div align="center"><img src="logo.png" width="249" height="183"></div></td>
<td width="39%" colspan="2"> </td>
</tr>
<tr>
<td height="82" colspan="2"><div align="center"></div></td>
<td colspan="2"><div align="center"></div></td>
</tr>
<tr>
<td colspan="2"><div align="right"><img src="vincent/'+ Math.round((Math.random()*3)+1)+ '.png" width="364" height="74"></div></td>
<td colspan="2"><div align="left"><img src="chalamon/'+ Math.round((Math.random()*3)+1)+ '.png" width="392" height="74"></div></td>
</tr>
</table>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr class="menu">
<td width="20%"><div align="center"><a href="index.htm">ACCUEIL</a></div></td>
<td width="20%"><div align="center"><a href="codeserecom.htm">SERECOM</a></div></td>
<td width="20%"><div align="center"><a href="codeprive.htm">PRIVE</a></div></td>
<td width="20%"><div align="center"><a href="loisirs.htm">LOISIRS</a></div></td>
<td width="20%"><div align="center"><a href="legal.htm">LEGAL</a></div></td>
</tr>
</table>
<p> </p>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="body">
<tr>
<td width="21%" class="cadregauche"><div align="right"></div></td>
<td width="58%" class="cadre"><p align="center">Bonjour,</p>
<p align="center">Bienvenue sur mon site perso : celui-ci est maintenant opérationnel !!!</p>
<p align="center">Vous trouverez ici mes cours de l'IUT SéRéCom (page codée) ainsi que divers fichiers de ma vie privée (page codée aussi... eh eh eh, soyez pas deg !!!).</p>
<p align="center">Quelques articles portant sur différents loisirs (musique, films, séries, mangas, jeux vidéos...) se trouvent dans la partie "Loisirs" du site, et j'espère que beaucoup d'entre vous me proposeront leurs articles ou déposeront leurs opinions.</p></td>
<td width="21%" class="cadredroite"><div align="left"></div></td>
</tr>
</table>
</body>
</html>