valigns css

heji

Registered
#menutitle {
background-image: url(img/menutitle1.png);
height: 60px;
width: 200px;
color: #00b6e3;
font-weight: bold;
text-decoration: none;
font-family: Verdana;
font-size: 20px;
}

здрасти как да направя текста да е по средата на това?
 
Код:
#menutitle { 
background-image: url(img/menutitle1.png); 
height: 60px; 
width: 200px; 
color: #00b6e3; 
font-weight: bold; 
text-decoration: none; 
font-family: Verdana; 
font-size: 20px; 
text-align: center;
}
 
#menutitle {
background-image: url(img/menutitle1.png);
padding-top:30px;
height:30px;

width: 200px;
color: #00b6e3;
font-weight: bold;
text-decoration: none;
font-family: Verdana;
font-size: 20px;
}
Сега забележи, че сбора на:
padding-top+height=60px;
Може да пробваш да слагаш padding-top както пожелаеш, но трябва винаги да внимваш, така че сбора на височината на дива+падинга да е 60px;
 

Back
Горе