CSS, centrer mon texte du menu déroulant

Résolu
isocolt Messages postés 27 Statut Membre -  
isocolt Messages postés 27 Statut Membre -
Bonjour,

Je suis entrain de faire un site mobile. j'ai effectué un menu déroulant où j'ai facilement centrer le texte horizontalement mais je n'arrive pas à le centrer verticalement

voici l'exemple pour mieux comprendre

http://www.stations-de-ski.ch/mobile/menu2/

je vous mets aussi ci-dessous le code de ma feuille de style

*{
margin:0;
padding:0;
}
#menu{
width:350px;
margin:20px auto 0 auto;
}
.menu, .sousmenu{
text-align:center;
}
.menu{
height:50px;
width:350 px;
padding:1px 0;
background:#E6E6E6;
color:#fff;
}
.sousmenu{
height:50px;
width:350px;
padding:1px 0;
background:#000099;
color:#000000;
}
.menu a{
display:block;
width:100%;
height:100%;
color:#fff;
font-family:arial,sans-serif;
font-size:18px;
font-weight:bold;
text-decoration:none;
background:#000099;
}
.sousmenu a{
display:block;
width:100%;
height:100%;
color:#000000;
font-family:arial,sans-serif;
font-size:16px;
font-weight:bold;
text-decoration:none;
background:#E6E6E6;



Merci d'avance pour vos futures réponses


A voir également:

2 réponses

Nico_ Messages postés 1302 Statut Membre 189
 
bonjour,

.menu
{
height:50px;
width:350 px;
padding:1px 0;
background:#E6E6E6;
color:#fff; 
vertical-align: middle;
line-height: 50px;
}

ça devrait fonctionner, je ne sais pas si c'est la bonne solution
0
isocolt Messages postés 27 Statut Membre 2
 
Super c'est nikel

Merci infiniment Nico_
0