[css] menu / sous-menu OK sous firefox pas IE
titi
-
Dalida Messages postés 7114 Statut Contributeur -
Dalida Messages postés 7114 Statut Contributeur -
bonsoir,
j'ai fait un menu avec un sous menu en css. tout marche nikel sous firefox mais pas sous ie. le sous menu refuse de s'afficher je trouve pas pourquoi. uene petite idée ?? voici le css :
body {
background-color:#000000;
margin:0px;
padding:0px;
position:fixed;
font: 0.8em Verdana, sans-serif;
}
/*------- Menu --------------*/
ul#menu {
background-color:transparent;
color:#FFFFFF;
list-style-type:none;
position:fixed;
padding-left:175px !important;
padding-left:0px;
}
ul#menu li {
padding-top:25px !important;
padding-top:36px;
padding-left:0px;
float:left;
}
ul#menu a {
float: left;
margin: 0 10px;
padding: 1px 2px;
text-align: center;
text-decoration: none;
color: #000000;
background: #FF9900;
}
ul#menu a:hover {
background: #000000;
color:#FFFFFF;
}
/*-------- Sous Menu -------------*/
#menu .sousMenu
{
display:none;
background-color:transparent;
float:left;
position:fixed;
list-style-type:none;
margin:0px;
padding-top:0px;
border:0px;
}
#menu .sousMenu li
{
background-color:transparent;
float:left;
margin: 0;
border: 0;
color:#0033FF;
}
#menu li:hover > .sousMenu { display: block; }
ul#menu .sousMenu a {
float:left;
margin: 0 10px;
padding: 1px 2px;
text-align:center;
text-decoration:none;
color:#000000;
background:#cc3333;
}
ul#menu .sousMenu a:hover {
background: #000000;
color:#FFFFFF;
}
merci ca fait 4 heure que je tourne en rond...
j'ai fait un menu avec un sous menu en css. tout marche nikel sous firefox mais pas sous ie. le sous menu refuse de s'afficher je trouve pas pourquoi. uene petite idée ?? voici le css :
body {
background-color:#000000;
margin:0px;
padding:0px;
position:fixed;
font: 0.8em Verdana, sans-serif;
}
/*------- Menu --------------*/
ul#menu {
background-color:transparent;
color:#FFFFFF;
list-style-type:none;
position:fixed;
padding-left:175px !important;
padding-left:0px;
}
ul#menu li {
padding-top:25px !important;
padding-top:36px;
padding-left:0px;
float:left;
}
ul#menu a {
float: left;
margin: 0 10px;
padding: 1px 2px;
text-align: center;
text-decoration: none;
color: #000000;
background: #FF9900;
}
ul#menu a:hover {
background: #000000;
color:#FFFFFF;
}
/*-------- Sous Menu -------------*/
#menu .sousMenu
{
display:none;
background-color:transparent;
float:left;
position:fixed;
list-style-type:none;
margin:0px;
padding-top:0px;
border:0px;
}
#menu .sousMenu li
{
background-color:transparent;
float:left;
margin: 0;
border: 0;
color:#0033FF;
}
#menu li:hover > .sousMenu { display: block; }
ul#menu .sousMenu a {
float:left;
margin: 0 10px;
padding: 1px 2px;
text-align:center;
text-decoration:none;
color:#000000;
background:#cc3333;
}
ul#menu .sousMenu a:hover {
background: #000000;
color:#FFFFFF;
}
merci ca fait 4 heure que je tourne en rond...
A voir également:
- [css] menu / sous-menu OK sous firefox pas IE
- Menu déroulant excel - Guide
- Canon quick menu - Télécharger - Utilitaires
- Windows 11 menu contextuel classique - Guide
- Windows 11 menu démarrer classique - Guide
- Réinitialiser menu démarrer windows 10 - Guide
4 réponses
salut,
peut être parce que tu utilises IE6 et que IE6 ne reconnait pas le sélecteur d'enfant ('>').
peut être parce que tu utilises IE6 et que IE6 ne reconnait pas le sélecteur d'enfant ('>').
#menu li:hover > .sousMenu { display: block; }
http://www.christopher-jablonski.com/fr/reperes/ie6.shtml
L'alternative existe mais elle complique le code.
L'alternative existe mais elle complique le code.