2014-12-22 74 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