Bonjour,
J'ai un petit problème d'affichage avec ma fonction javascript onClick. Voici le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="screen" type="text/css" title="style" href="../css/style.css" /> <title>Ogame Links</title> <script language="JavaScript"> function affichage2(eltAafficher) { var eltAfficher = document.getElementById(eltAafficher); if (eltAfficher.style.visibility=="visible") { eltAfficher.style.visibility="hidden"; } else { eltAfficher.style.visibility="visible"; } } </script> </head> <body> <div id="en_tete"> <!-- banniere --> </div> <br /> <div id="corps"> <div class="image_corps_haut"> </div> <br /> <center> <img src="../images/ogamelinks_07.jpg" width="69" height="60" alt="ogamelinks_07"/> <img src="../images/ogamelinks_08.jpg" width="700" alt="titre1" value="compte1" onclick="affichage2('un');"/> <br /><br /> <div id="un" style="visibility:hidden"> <table border="2" width="600"> <thead> <tr> <th width="200">Nom</th> <th width="300">Description</th> <th width="100">Lien</th> </tr> </thead> <tbody> <tr> <td><center>Nom lien1</center></td> <td><center>Description lien1</center></td> <td><center>Lien1</center></td> </tr> <tr> <td><center>Nom lien2</center></td> <td><center>Description lien2</center></td> <td><center>Lien2</center></td> </tr> <tr> <td><center>Nom lien3</center></td> <td><center>Description lien3</center></td> <td><center>Lien3</center></td> </tr> </tbody> </table> </div> <br /><br /><br /> <img src="../images/ogamelinks_07.jpg" width="69" height="60" alt="ogamelinks_07"/> <img src="../images/ogamelinks_08.jpg" width="700" alt="titre1" value="compte1" onclick="affichage2('deux');"/> <br /><br /> <div id="deux" style="visibility:hidden"> <table border="2" width="600"> <thead> <tr> <th width="200">Nom</th> <th width="300">Description</th> <th width="100">Lien</th> </tr> </thead> <tbody> <tr> <td><center>Nom lien1</center></td> <td><center>Description lien1</center></td> <td><center>Lien1</center></td> </tr> <tr> <td><center>Nom lien2</center></td> <td><center>Description lien2</center></td> <td><center>Lien2</center></td> </tr> <tr> <td><center>Nom lien3</center></td> <td><center>Description lien3</center></td> <td><center>Lien3</center></td> </tr> </tbody> </table> <br><br><br> </div> <div class="image_corps_bas"> </div> </center> </div> </body> </html>
En fait quand je clique sur les images mes divs s'affichent et se cachent bien correctement ca c'est nikel![]()
Par contre le problème c'est que quand les div sont cachées il y a un gros espace blanc entre mes deux images, or je voudrais justement que quand les divs sont cachées les images soient collées et quand les div apparaissent alors elles s'intègrent entre les images. Quelqu'un a-t-il une idée pour résoudre se problème?
Merci d'avance,
Partager