Bonjour à tous.
Débutant en CSS, j'ai essayé de gérer mon menu en CSS (changer l'image de fond quand on survole le lien)
J'ai un soucis d'affichage du menu que je gère en CSS avec internet explorer.
J'ai testé sur firefox et ça marche bien mais une fois que je passe sous IE le menu ne garde pas son alignement.
voici un exemple
exemple 1
Mais un truc que j'ai remarqué en cherchant à résoudre le problème c'est que si j'enlève le contenu du texte central, mon menu s'aligne mieux.
exemple 2
Le plus rageant c'est que sous les dernières versions de Firefox et IE ça s'affiche bien.
Voici mon code CSS pour vous aider.
Code css : 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197 html{ background:#8d959b; } body { font-size:0.8em; font-family:Verdana, Arial, sans-serif ; border:none; color:#00457C; } h1 { padding-top:10px; padding-left:40px; font-size:1.5em; color:#5E6F7D; font-weight:normal; background:url("../Images/puces/puce1.png") no-repeat; background-position: 5px 8px; } h2 { padding-top:5px; font-size:1.2em; } h3 { margin-left:20px; padding-top:5px; color:#F6AF33; font-size:1em; font-style:italic; } h3 a { color:#F6AF33; } a:hover{ color:#5E6F7D; } img{ border:none; } .logo { width:164px; vertical-align:bottom; } .header_menu { text-align:right; height:10px; } .td_menu { text-align:left; } .menu1{ margin-top:20px; position:absolute; width:440px; float:left; margin-left:155px; text-align:center; font-size:12px; } .menu1 a:link{ color:#ffffff; padding-top:20px; padding-bottom:124px; } .menu1 a:visited{/*très très important pour garder les images du menu après avoir cliqué une fois dans IE*/ color:#ffffff; padding-top:20px; padding-bottom:124px; } .menu1 a:hover{ color:#F6AF33; } .td_menu_activites { background:url("../Images/logo_activites_dark2.png") no-repeat; text-align:center; vertical-align:top; width:111px; height:155px; border:0; } .td_menu_activites a { color:#FFFFFF; } .td_menu_activites a:visited{ color:#FFFFFF; } .td_menu_activites a:hover { background:url("../Images/logo_activites_dark1.png") no-repeat; display:block; text-align:center; vertical-align:top; width:111px; height:155px; border:0; color:#F6AF33; } .td_menu_formations { background:url("../Images/logo_formations_dark2.png") no-repeat; text-align:center; vertical-align:top; width:111px; height:155px; border:0; } .td_menu_formations a { color:#FFFFFF; } .td_menu_formations a:visited{ color:#FFFFFF; } .td_menu_formations a:hover { background:url("../Images/logo_formations_dark1.png") no-repeat; display:block; text-align:center; vertical-align:top; width:111px; height:155px; border:0; color:#F6AF33; } .td_menu_partenaires { background:url("../Images/logo_partenaires_dark2.png") no-repeat; text-align:center; vertical-align:top; width:111px; height:155px; border:0; } .td_menu_partenaires a { color:#FFFFFF; } .td_menu_partenaires a:visited{ color:#FFFFFF; } .td_menu_partenaires a:hover { background:url("../Images/logo_partenaires_dark1.png") no-repeat; display:block; text-align:center; vertical-align:top; width:111px; height:155px; border:0; color:#F6AF33; } .td_menu_contacts { background:url("../Images/logo_contacts_dark2.png") no-repeat; text-align:center; vertical-align:top; width:111px; height:155px; border:0; } .td_menu_contacts a { color:#FFFFFF; } .td_menu_contacts a:visited{ color:#FFFFFF; } .td_menu_contacts a:hover { background:url("../Images/logo_contacts_dark1.png") no-repeat; display:block; text-align:center; vertical-align:top; width:111px; height:155px; border:0; color:#F6AF33; }
Voici le code html de ma page au cas ou.
Code html : 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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <HTLM> <HEAD> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <TITLE></TITLE> <link rel="stylesheet" type="text/css" media="screen" href="./Styles/mit.css" /> <link rel="shortcut icon" href="http://membres.multimania.fr/aashur/Images/Logo.ico" /> <script src="./Js/mit.js" type="text/javascript"></script> </HEAD> <BODY> <CENTER> <TABLE border="0" width="800"> <TR> <TD rowspan="2" class="logo"> <A href="./index.html"> <IMG src="./Images/logo_small.jpg" width="164"/> </A> </TD> <TD colspan="5" class="header_menu"> Accueil - <A href="./plan/index.html">Plan du site</A> - <A href="./who/inex.html">Qui sommes-nous ?</A> - <A href="./contacts/index.html">Contact</A><br /> </TD> </TR> <TR> <DIV class="menu1"> <TD class="td_menu_activites" > <A href="./activities/index.html">activités</A> </TD> <TD class="td_menu_formations" > <A href="./formations/index.html">Formations</A> </TD> <TD class="td_menu_partenaires" > <A href="./partners/index.html">Partenaires</A> </TD> <TD class="td_menu_contacts"> <A href=".contacts/index.html">Contacts</A> </TD> </DIV> </TR> <TR> <TD rowspan="2"> </TD> <TD colspan="4" class="td_fil_arianne"> <A href="./index">Accueil</A> </TD> <TD rowspan="2" width="150"> </TD> </TR> <TR> <TD colspan="4" class="td_main"> <br /> bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla bla <br /><br /> </TD> </TR> <TR> <TD> </TD> <TD colspan="4" class="td_footer"> <A href="./index.html">Accueil</A> - <A href="./activities/index.html">Activités</A> - <A href="./formations/index.html">formations</A> - <A href="./partners/index.html">Partenaires</A> - <A href="./contacts/index.html">Contacts</A> <br /> <A href="./who/index.html">Qui sommes-nous ?</A> - <A href="./plan/index.html">Plan du site</A> </TD> <TD> </TD> </TR> </TABLE> </CENTER> </BODY> </HTML>
Voila, si quelq'un pouvait me mettre sur une piste pour résoudre ce soucis de compatibilité, je serai content
Pendant ce temps, je vais continuer à chercher et si jamais je trouve une réponse je vous le ferai parvenir.
Bonne journée.
P.S : J'ai parlé trop vite, ça ne marche pas sous IE 8. Je suis ouvert à toutes propositions.
Partager