2013-08-19 24 views
1

這是圖像:http://i.imgur.com/E4LYhN2.png。日期和作者圖標未與日期,作者姓名正確對齊。對齊後的圖標字體和正確的發佈日期

的圖標和發佈日期CSS代碼:

.entry-meta { /* Container for the entry metadata */ 
    clear: both; 
    font-size: 13px; 
    font-size: 1.3rem; 
} 
// code for icon fonts 
.genericon:before { 
    display: inline-block; 
    -webkit-font-smoothing: antialiased; 
    font: normal 16px 'Genericons'; 
    font-size: 1.6rem; 
    vertical-align: top; 
    margin-right: 5px; 
} 

.genericon-user:before { content: '\f304'; } 
.genericon-month:before{ content: '\f307'; } 

回答

0

而不是vertical-align: top;

vertical-align: middle; /* or try with baseline */ 

https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align

+0

我都嘗試,但它並非十全十美。 – Orahmax

+0

事實上,它看起來最好與垂直對齊:頂部,沒有其他更接近。 – Orahmax

+0

@MohitChawla比使用'vertical-align:Npx;'+或 - 或者只是添加'margin-top:2px;'就完成了。你有沒有看到我的答案中的鏈接? –