2014-12-22 73 views
0

我遇到圖像溢出設置邊框的問題,我的tumblr博客上的鏈接類型的帖子。我嘗試調整圖像的寬度和高度比例和百分比,但我無法解決問題。這對於任何其他帖子類型的圖像也不是問題。圖像溢出邊框

enter image description here

這裏是我很肯定決定的這個外觀的代碼。

.post.link .postcontainer{ 
     padding:0; 
     overflow:hidden; 
     padding-bottom:5px; 
    } 

    .post.link .description{ 
     padding-left:20px; 
     padding-right:60px; 
     padding-bottom:10px; 
    } 


    .post.link a.postlink{ 
     font-family:"Helvetica Neue", helvetica, Arial, sans-serif; 
     font-size:12; 
     color:#000; 
     font-weight:bold; 
     width:428px; 
     padding-right:70px; 
     display:block; 
     padding-top:15px; 
     padding-bottom:10px; 
     padding-left:20px; 
     text-decoration:none; 

    } 

    .post.link a.postlink span{ 
     background: url(http://static.tumblr.com/xsp9wak/PHAkloide/icon-linkpost-arrow.png) no-repeat top left; 
     width:35px; 
     height:36px;  
     display:block; 
     position:absolute; 
     right:20px; 
     top:50%; 
     margin-top:-17px; 
     opacity: .7; 
     -moz-opacity: 0.7; 
    } 

    .post.link a.postlink:hover span{ 
     opacity: 1; 
     -moz-opacity: 1; 
    } 

    .post.link .vialink{ 
     margin-left:20px; 
    } 
+0

你能也增加一些'html'示例代碼,顯示發生了什麼形象? – ckuijjer

+0

可以發表一個小提琴樣本或工作鏈接,以獲得清晰的圖片? – Aru

+0

恩,這是鏈接到永久鏈接頁面:http://grumpyvich.tumblr.com/post/105855669032/matthew-gilberts-picks-for-tvs-best-shows-in – Alex

回答

1

對於圖像,它的理想添加以下CSS規則:

img { 
    max-width: 100%; 
} 
+0

這可以解決您的問題@Alex的問題,或許通過添加例如'.postcontainer img {max-width:100%; }' – ckuijjer

+0

我應該在哪裏插入?我嘗試了幾個地方,他們要麼不做任何事情,要麼改變鏈接,使其不再作爲鏈接,而是作爲純文本。 – Alex

+0

CSS中的任何位置或自定義CSS塊。 – mikedidthis