Salut à vous,
Voilà, je suis en train de créer une page qui intègre un script (bien chouette au passage
) qui permet d'afficher et de cacher des divs.
Le problème est que lorsque ces divs s'affichent, ils se superposent....
Je préférerais beaucoup que lorsque l'on affiche un de ces blocs, il "pousse" le reste du contenu plus bas dans la page.
Voici d'abord le javascript :
Ensuite, le html (en partie)
A mon avis, le problème viens de la définition du style des blocs mois (janvier, février).
Auriez-vous une idée ??
Merci beaucoup
Voilà, je suis en train de créer une page qui intègre un script (bien chouette au passage

Le problème est que lorsque ces divs s'affichent, ils se superposent....
Je préférerais beaucoup que lorsque l'on affiche un de ces blocs, il "pousse" le reste du contenu plus bas dans la page.
Voici d'abord le javascript :
<script language="JavaScript" type="text/javascript">
function showAll(){
show("janvier");
show("fevrier");
show("mars");
}
function hideAll(){
hide("janvier");
hide("fevrier");
hide("mars");
}
function show(layer_ref) {
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = 'visible'");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = 'visible';
}
if (document.getElementById && !document.all) {
cartouche = document.getElementById(layer_ref);
cartouche.style.visibility = 'visible';
}
}
function hide(layer_ref) {
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = 'hidden'");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = 'hidden';
}
if (document.getElementById && !document.all) {
cartouche = document.getElementById(layer_ref);
cartouche.style.visibility = 'hidden';
}
}
function showHide(layer_ref) {
if (document.all) { //IS IE 4 or 5 (or 6 beta)
state = eval( "document.all." + layer_ref + ".style.visibility ");
}
if (document.layers) { //IS NETSCAPE 4 or below
state = document.layers[layer_ref].visibility ;
}
if (document.getElementById && !document.all) {
state = document.getElementById(layer_ref).style.visibility;
}
state = (state == 'visible')?'hidden': 'visible';
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
cartouche = document.getElementById(layer_ref);
cartouche.style.visibility = state;
}
}
</script>
Ensuite, le html (en partie)
<table width="590" class="fest_mois" border="0" cellspacing="0" cellpadding="0 ">
<tr>
<td class="cart_info_pge">Janvier <a href="javascript://" onclick="showHide('janvier');" class="fest_details">+++</a></td>
</tr>
<tr>
<td class="info_pge"><div id="janvier" style="height:250px;overflow:auto;visibility:hidden;position:fixed;"> <table width="580" border="0" cellpadding="0 " cellspacing="0">
<tr>
<td ><table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td nowrap class="fest_tt">
<p><strong><a href="http://www.usine.ch/" target="_blank">Festival
Particules</a></strong></p></td>
<td nowrap class="fest_date" ><p>06/01/05
<img src="../img/arrow_date.gif" width="8" height="7" border="0" class="cart_manif_arrow">
11/01/05</p></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="fest_txt"> <p>Festival
interdisciplinaire dont les
artistes se présentent
en solo. <a href="http://www.usine.ch/" target="_blank">+++</a></p></td>
</tr>
<tr>
<td class="fest_sep"><img src="../img/fest_sep.gif" width="580" height="1"></td>
</tr>
<tr>
<td class="fest_txt"><table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td nowrap class="fest_tt"><p><a href="http://www.diagonales.ch/" target="_blank"><strong>Suisse
Diagonales jazz 05</strong></a></p></td>
<td nowrap class="fest_date" ><p>08/01/05
<img src="../img/arrow_date.gif" width="8" height="7" border="0" class="cart_manif_arrow">
15/01/05</p></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="fest_txt"><p>Textes
à ajouter. <a href="http://www.diagonales.ch/" target="_blank">+++</a></p></td>
</tr>
<tr>
<td class="fest_sep"><img src="../img/fest_sep.gif" width="580" height="1"></td>
</tr>
<tr>
<td class="fest_txt"><table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td nowrap class="fest_tt"><p><a href="http://www.cfam.ch/"><strong>Festival
CFAM en faveur<br>
des sinistrés
de l'Asie du sud</strong></a></p></td>
<td nowrap class="fest_date" >
<p>21/01/05</p></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="fest_txt"><p>Textes
à ajouter. <a href="http://www.cfam.ch/" target="_blank">+++</a></p></td>
</tr>
<tr>
<td class="fest_sep"><img src="../img/fest_sep.gif" width="580" height="1"></td>
</tr>
<tr>
<td class="fest_txt"><table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td nowrap class="fest_tt"><p><a href="http://www.villadutoit.ch/" target="_blank"><strong>Festival
Couleurs baroques</strong></a></p></td>
<td nowrap class="fest_date" >
<p>21/01/05 <img src="../img/arrow_date.gif" width="8" height="7" border="0" class="cart_manif_arrow">
23/01/05</p></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="fest_txt"><p>Textes
à ajouter. <a href="http://www.villadutoit.ch/" target="_blank">+++</a></p></td>
</tr>
<tr>
<td class="fest_sep"><img src="../img/fest_sep.gif" width="580" height="1"></td>
</tr>
<tr>
<td class="fest_txt"><table border="0" cellspacing="0" cellpadding="0" >
<tr>
<td nowrap class="fest_tt"><p><a href="http://www.festibalkans.ch/" target="_blank"><strong>Festibalkans</strong></a></p></td>
<td nowrap class="fest_date" >
<p>??/01/05</p></td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td class="fest_txt"><p>Festival
de musiques balkaniques, organisé
par la Croix-Rouge jeunesse
genevoise. <a href="http://www.festibalkans.ch/" target="_blank">+++</a></p></td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="sep_30"></td>
</tr>
</table>
A mon avis, le problème viens de la définition du style des blocs mois (janvier, février).
Auriez-vous une idée ??
Merci beaucoup
