Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > JavaScript > Bibliothèques & Frameworks > jQuery
jQuery Forum d'entraide sur le framework jQuery. Avant de poster : Tutoriels jQuery, FAQ jQuery, Tous les tutoriels JavaScript, Toutes les FAQ JavaScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 02/12/2011, 16h09   #1
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
Par défaut compatibilité de menu dans Internet explorer

Bonjour à tous,

J'ai un souci sur un menu très simple qui ne fonctionne pas dans explorer.
Est-ce que quelqu'un saurait m'aider pour résoudre ce petit souci?
Merci d'avance.

Voici le code HTLL et CSS
Code :
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
<script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
<script src="scripts/swfobject_modified.js" type="text/javascript"></script>
<style type="text/css"> 
	html { 
		overflow: hidden; 
	} 
	body { 
		margin: 0px; 
		padding: 0px; 
		background: #000; 
		position: absolute; 
		font-family: "Gill Sans MT";
		width: 100%; 
		height: 100%; 
 
	} 
	#center { 
		position: absolute; 
 
	} 
	#screen {
	position:absolute;
	width: 100%;
	height: 100%;
	background: #000;
	overflow: hidden;
	outline: #000 solid 40px;
	font-family: arial;
	left: -7px;
	} 
	#screen img { 
		position: absolute; 
		-ms-interpolation-mode:nearest-neighbor; 
		image-rendering: optimizeSpeed; 
	} 
	ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
 
#navigation {
	background: #000;
	width: 10em;
	top: 0px;
	right: 0px;
	height: 25px;
	position: fixed;
	filter: alpha(opacity=70);
	opacity: 0.7;
}
 
#navigation li {
	float: left;
	height: 100%;
	margin-right: 0.5em;
/*	line-height: 2;*/
	width: 11em;
	text-align: center;
}
 
#navigation a {
	font-weight: bold;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
}
 
#navigation a:hover {
	text-decoration: underline;
}
 
#navigation li ul {
	width: 100%;
	background: #000;
	display: none;
	font-size: 12px;
}
 
#navigation li ul li {
	float: none;
	margin: 0 0 0.3em 0;
	line-height: normal;
	text-align: left;
	width: 100%;
}
 
#navigation li ul li a {
	display: block;
	width: 100%;
	padding: 1em 0;
	text-indent: 1em;
}
 
#navigation li ul li a:hover {
	background: #333;
}
.titremenu {
	font-family: "Gill Sans MT";
	text-align: center;
	vertical-align: middle;
	font-size: 15px;
	font-weight: bold;
}
#audio {
	top: 0px;
	right: 160px;
	position: absolute;
	}
 
</style> 
 
<script type="text/javascript" language="javascript">
 
var messaggio = "Right clic disabled - clic droit désactivé - clic destro disabilitato";
 
function DisabilitaIE4(){
    if (event.button == 2){
        alert(messaggio);
        return false;
    }
}
 
function DisabilitaNS4(e){
    if (document.layers || document.getElementById && !document.all){
        if (e.which == 2 || e.which == 3) {
            alert(messaggio);
            return false;
        }
    }
}
 
document.onload = function () {
    if (document.layers){
        document.captureEvents(Event.MOUSEDOWN);
        document.onmousedown = DisabilitaNS4;
    }
    else if (document.all && !document.getElementById){
        document.onmousedown = DisabilitaIE4;
    }
}
 
document.oncontextmenu = function () { 
    alert(messaggio);
    return false;
}
 
// --> 
</script>
<script type="text/javascript">
$(function() {
 
  $('li.submenu', '#navigation').each(function() {
 
    var $li = $(this);
    var $a = $li.find('a:first');
    var $ul = $li.find('ul');
 
    $a.mouseover(function() {
 
      $ul.slideDown('slow');
 
 
    });
 
    $ul.mouseleave(function() {
 
      $ul.slideUp('slow');
 
    });
 
 
  });
 
 
});
</script>
</head> 
 
<body> 
 
<div id="screen"></div> 
 
 
<ul id="navigation">
  <li class="submenu"><a href="#" class="titremenu">Menu</a>
			<ul>
			<li><a href="gallery.html">Collections</a></li>
            <li><a href="#">Virtual gallery</a></li>
			<li><a href="links.html">Links</a></li>
			<li><a href="contact.html">Contact</a></li>
		</ul>
        </li>
</script>
</body> 
</html>
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 16h12   #2
Rédacteur/Modérateur
 
Avatar de SpaceFrog
 
Homme
Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Inscription : mars 2002
Messages : 30 066
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Royaume-Uni

Informations professionnelles :
Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Secteur : Industrie

Informations forums :
Inscription : mars 2002
Messages : 30 066
Points : 45 193
Points : 45 193
Code :
   if (document.layers || document.getElementById && !document.all){
il date de 1932 ton code ?
__________________
Ma page Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag


réalisations :www.planet-languages.com|www.saftair.com| www.ouestisol.fr | www.sebemex.fr | www.extramiante.fr | www.sistac-alizay.fr | www.acoustishop.fr | www.litt.fr | www.ouestventil.fr
SpaceFrog est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 16h28   #3
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
C'ìest dans le script que j'ai récupéré pour désactiver le clic droit mais même en l'enlevant le problème reste le même.
Le menu ne se déroule pas ou plutôt il reste en arrière plan...
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 16h29   #4
Rédacteur/Modérateur
 
Avatar de SpaceFrog
 
Homme
Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Inscription : mars 2002
Messages : 30 066
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Royaume-Uni

Informations professionnelles :
Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Secteur : Industrie

Informations forums :
Inscription : mars 2002
Messages : 30 066
Points : 45 193
Points : 45 193
rajoute un z-index ?
__________________
Ma page Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag


réalisations :www.planet-languages.com|www.saftair.com| www.ouestisol.fr | www.sebemex.fr | www.extramiante.fr | www.sistac-alizay.fr | www.acoustishop.fr | www.litt.fr | www.ouestventil.fr
SpaceFrog est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 16h34   #5
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
Déjà essayé sans succès.
Il y autre chose qui ne plait pas à explorer...
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 16h37   #6
Rédacteur/Modérateur
 
Avatar de SpaceFrog
 
Homme
Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Inscription : mars 2002
Messages : 30 066
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Royaume-Uni

Informations professionnelles :
Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Secteur : Industrie

Informations forums :
Inscription : mars 2002
Messages : 30 066
Points : 45 193
Points : 45 193
si tu dis que le menu se deroule derrière ... c'est clairement un souci de z-index ...
__________________
Ma page Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag


réalisations :www.planet-languages.com|www.saftair.com| www.ouestisol.fr | www.sebemex.fr | www.extramiante.fr | www.sistac-alizay.fr | www.acoustishop.fr | www.litt.fr | www.ouestventil.fr
SpaceFrog est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 02/12/2011, 17h20   #7
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
Portant même avec le z-indez à 9999, c'est pareil et il n'y a rien d'autre dans la page.
Il est également visible ici.

Code :
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pierre Achiary</title>
<meta name="keywords" content="Pierre Achiary, pittura astratta, peinture abstraite, abstract painting/>
<meta name="description" content="Pierre Achiary  - Site officiel - Sito ufficiale"/>
<meta name="distribution" content="global"/>
<meta name="copyright" content="Pierre Achiary"/>
<meta name="author" content="MultimediArt"/>
<meta name="robots" content="index, follow"/>
<meta http-equiv="content-language" content="en"/>
<meta name="expires" content="never"/>
<meta name="revisit-after" content="7 days"/>
<link rel="shortcut icon" href="http://www.pierreachiary.info/favicon.ico"/>
<script type="text/javascript" src="scripts/jquery-1.6.1.min.js"></script>
<script src="scripts/swfobject_modified.js" type="text/javascript"></script>
<style type="text/css"> 
	html { 
		overflow: hidden; 
	} 
	body { 
		margin: 0px; 
		padding: 0px; 
		background: #000; 
		position: absolute; 
		font-family: "Gill Sans MT";
		width: 100%; 
		height: 100%; 
 
	} 
	#center { 
		position: absolute; 
 
	} 
	#screen {
	position:absolute;
	width: 100%;
	height: 100%;
	background: #000;
	overflow: hidden;
	outline: #000 solid 40px;
	font-family: arial;
	left: -7px;
	} 
	#screen img { 
		position: absolute; 
		-ms-interpolation-mode:nearest-neighbor; 
		image-rendering: optimizeSpeed; 
	} 
	ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
 
#navigation {
	background: #000;
	width: 10em;
	top: 0px;
	right: 0px;
	height: 25px;
	position: fixed;
	filter: alpha(opacity=70);
	opacity: 0.7;
	z-index: 9999;
}
 
#navigation li {
	float: left;
	height: 100%;
	margin-right: 0.5em;
/*	line-height: 2;*/
	width: 11em;
	text-align: center;
   	z-index: 9999;
}
 
#navigation a {
	font-weight: bold;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	z-index: 9999;
}
 
#navigation a:hover {
	text-decoration: underline;
	z-index: 9999;
}
 
#navigation li ul {
	width: 100%;
	background: #000;
	display: none;
	font-size: 12px;
	z-index: 9999;
}
 
#navigation li ul li {
	float: none;
	margin: 0 0 0.3em 0;
	line-height: normal;
	text-align: left;
	width: 100%;
}
 
#navigation li ul li a {
	display: block;
	width: 100%;
	padding: 1em 0;
	text-indent: 1em;
	z-index: 9999;
}
 
#navigation li ul li a:hover {
	background: #333;
	z-index: 9999;
}
.titremenu {
	font-family: "Gill Sans MT";
	text-align: center;
	vertical-align: middle;
	font-size: 15px;
	font-weight: bold;
}
#audio {
	top: 0px;
	right: 160px;
	position: absolute;
	}
 
</style> 
 
<script type="text/javascript">
$(function() {
 
  $('li.submenu', '#navigation').each(function() {
 
    var $li = $(this);
    var $a = $li.find('a:first');
    var $ul = $li.find('ul');
 
    $a.mouseover(function() {
 
      $ul.slideDown('slow');
 
 
    });
 
    $ul.mouseleave(function() {
 
      $ul.slideUp('slow');
 
    });
 
 
  });
 
 
});
</script>
</head> 
 
<body> 
 
<div id="screen"></div> 
 
 
<ul id="navigation">
  <li class="submenu"><a href="#" class="titremenu">Menu</a>
			<ul>
			<li><a href="gallery.html">Collections</a></li>
            <li><a href="#">Virtual gallery</a></li>
			<li><a href="links.html">Links</a></li>
			<li><a href="contact.html">Contact</a></li>
		</ul>
        </li>
</script>
</body> 
</html>
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/12/2011, 13h58   #8
Rédacteur/Modérateur
 
Avatar de SpaceFrog
 
Homme
Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Inscription : mars 2002
Messages : 30 066
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : Royaume-Uni

Informations professionnelles :
Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Analyste Programmeur
Secteur : Industrie

Informations forums :
Inscription : mars 2002
Messages : 30 066
Points : 45 193
Points : 45 193
Code :
1
2
3
4
5
6
7
8
9
10
<ul id="navigation">
  <li class="submenu"><a href="#" class="titremenu">Menu</a>
			<ul>
			<li><a href="gallery.html">Collections</a></li>
            <li><a href="#">Virtual gallery</a></li>
			<li><a href="links.html">Links</a></li>
			<li><a href="contact.html">Contact</a></li>
		</ul>
        </li>
</script>
??, si déja ton code htm etait bien balancé !!!
c'est quoi cette balise de script à la fin ?
__________________
Ma page Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag


réalisations :www.planet-languages.com|www.saftair.com| www.ouestisol.fr | www.sebemex.fr | www.extramiante.fr | www.sistac-alizay.fr | www.acoustishop.fr | www.litt.fr | www.ouestventil.fr
SpaceFrog est actuellement connecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/12/2011, 09h56   #9
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
Oops, désolé, en voulant ne laisser que l'essentiel su code, cette balise est restée dans le code.
Cependant, ce n'est pas la cause du problème.
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/12/2011, 11h41   #10
Modérateur
 
Avatar de NoSmoking
 
Homme
Inscription : janvier 2011
Messages : 2 944
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations forums :
Inscription : janvier 2011
Messages : 2 944
Points : 4 776
Points : 4 776
Bonjour,
tu as un problème avec ton CSS, qui n'est pas des plus clean !
Code css :
1
2
3
4
5
6
7
8
9
10
11
#navigation {
	background: #000;
	width: 10em;
	top: 0px;
	right: 0px;
/*	height: 25px;   /*=- A SUPPRIMER -=*/
	position: fixed;
	filter: alpha(opacity=70);
	opacity: 0.7;
	z-index: 9999;
}
NoSmoking est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/12/2011, 12h47   #11
Candidat au titre de Membre du Club
 
Inscription : novembre 2010
Messages : 49
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 49
Points : 10
Points : 10
Merci de ton aide.
Ca marche nickel comme cela.
balsamique est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 15h16.


 
 
 
 
Partenaires

Hébergement Web