2012-04-08 8 views

Antwort

4

Sie versucht haben,

vertical-align:middle; 

oder

vertical-align:-10%; 

? This sieht gut für mich aus.

0

Es ist hackish, aber das sollte funktionieren.

a{ 
    font-family: arial, sans-serif;  
    background-color: #EEEEEE; 


    border: 1px solid #DDDDDD; 
    border-bottom: 1px solid #BBB; 

    color: #333; 
    padding: 4px 10px; 
    text-align: center; 
    text-shadow: 0 1px 0 #EEE; 
    font-weight:bold; 
    font-size:20px; 
    line-height:40px; 
    display:inline-block; 
    cursor:pointer; 
} 
span{ 
    font-size:40px; 
    vertical-align:-15%; 
} 
0

Try this:

span { 
    font-size: 40px; 
    line-height: 0; 
    vertical-align: middle; 
} 
0

Versuchen Sie a und span schweben.

a{ 
    font-family: arial, sans-serif;  
    background-color: #EEEEEE; 

    border: 1px solid #DDDDDD; 
    border-bottom: 1px solid #BBB; 

    color: #333; 
    padding: 4px 10px; 
    text-align: center; 
    text-shadow: 0 1px 0 #EEE; 
    font-weight:bold; 
    font-size:20px; 
    cursor:pointer; 
    line-height: 40px; 
    float: left; 
} 
span { 
    font-size:40px; 
    float: left; 
    margin: 0 .1em 0 0; 
} 
0

Sie können die Spannweite als Inline-Block anzuzeigen, und dann padding verwenden drauf ...

a{ 
    font-family: arial, sans-serif;  
    background-color: #EEEEEE; 


    border: 1px solid #DDDDDD; 
    border-bottom: 1px solid #BBB; 

    color: #333; 
    padding: 4px 10px; 
    text-align: center; 
    text-shadow: 0 1px 0 #EEE; 
    font-weight:bold; 
    font-size:20px; 
    display:inline-block; 
    cursor:pointer; 

} 
span{ 
    font-size:40px; 
    line-height: 0; 
    display: inline-block; 
    padding-bottom: 9px; 
} 
Verwandte Themen