2014-04-13 33 views
0

我目前正在研究我的tumblr主題頁腳大小。我改變了「員額.footer」的這樣,這將是更小的填充和想出了:Tumblr footers - 使它們平衡?

#wrapper #content .post .footer { 
background: {color:Footer} url({image:footer}); 
{block:IfFooterBorder} 
border: {text:Footer Border}px solid {color:Footer Border}; 
{/block:IfFooterBorder} 
font-family: {text:font family secondary}; 
font-size: 9px; 
color: {color:Footer text}; 
padding:4px 8px; 
margin-top:15px;margin-bottom:8px; 
line-height:8px; z-index:10; 
-webkit-transition: all 0.2s linear; 
-moz-transition: all 0.2s linear; 
-o-transition: all 0.2s linear; 
-ms-transition: all 0.2s linear; 
transition: all 0.2s linear; 
} 
#wrapper #content .post .footer .date { 
width: 67%; 
float: left; 
} 

#wrapper #content .post .footer .notes { 
width: 33%; 
float: right; 
text-align: right; 
} 

#wrapper #content .post .footer .notes a, #wrapper #content .post .footer .date a { 
color: {color:Footer link}; 
text-decoration:none; 
} 


#wrapper #content .post .footer .tags a { 
color: {color:Footer link}; 
{block:ifnotlinkunderline} 
text-decoration: none; 
{/block:ifnotlinkunderline} 
-webkit-transition: all 0.2s linear; 
-moz-transition: all 0.2s linear; 
-o-transition: all 0.2s linear; 
-ms-transition: all 0.2s linear; 
transition: all 0.2s linear; 
font-size: 10px; 
} 

於是我測試了它,我滿意的大小。但後來我發現第二個頁腳(帖子標籤的頁腳)的尺寸比第一個頁腳(時間,日期和音符的頁腳)稍大。

所以然後我決定編輯它併爲「標記」頁腳添加一個單獨的部分。我放在這間 「員額.footer .notes一個,.POST .footer .date一個」 和 「員額.footer .tags添加一個」:

#wrapper #content .post .footer .tags { 
padding:0px 0px; 
} 

我把墊襯0像素,從而由於沒有填充物,尺寸會更小。但它仍然沒有工作,所以我改變了內邊距到:

#wrapper #content .post .footer .tags { 
padding:-1px -1px; 
} 

然後我測試了它,但它仍然沒有奏效。這是怎麼回事?第二個頁腳的尺寸更大,頁腳仍然不平衡。我在這裏錯過了什麼嗎?

+0

請注意您的現場演示? – Godinall

+0

當然,這是http://jigokushoujoenma.tumblr.com/ – sha

回答

0

好的,標籤默認是內聯元素,所以您需要將display:block;添加到它,以便它可以適應您的自定義寬度和高度。

#wrapper #content .post .footer .tags a { 
    color: #ffdaf4; 
    text-decoration: none; 
    -webkit-transition: all 0.2s linear; 
    -moz-transition: all 0.2s linear; 
    -o-transition: all 0.2s linear; 
    -ms-transition: all 0.2s linear; 
    transition: all 0.2s linear; 
    font-size: 10px; 
    font-style: italic; 
    cursor: help; 
    display: block; //add this line to change the height 
    line-height: 8px; // add this line to vertical center your text for better looking 
} 
+0

我只是試過了,它所做的只是爲標籤頁腳欄上的每個標籤創建新段落。雖然兩個頁腳欄的大小仍然不平衡。 – sha

+0

但是非常感謝你的努力! – sha

+0

@mochii對不起沒有意識到你在一行中有多個標籤,在這種情況下,你需要爲.tags添加樣式,添加float:left;和高度:10px;這應該解決它 – Godinall