Pinterest Pin It按钮与相邻内容重叠

时间:2014-01-09 01:33:18

标签: html web social-networking social pinterest

我有一个Pinterest按钮,显示按钮旁边的计数。问题是计数显示为position:absolute;,因此它与其旁边的按钮重叠,如下所示:

Pinterest Button Overlap

是否有一个优雅的解决方案,使它不重叠而不增加按钮之间的空间?这是我用来显示按钮的代码(来自Pinterest Widget Builder):

<a href="//www.pinterest.com/pin/create/button/?url=http%3A%2F%2Fbooks.popublic.com%2Fnotmyuniverse%2F&media=http%3A%2F%2Fbooks.popublic.com%2Fnotmyuniverse%2Fimage%2Fcover.jpg&description=%22Not%20My%20Universe%22%20by%20Z.V.%20Mara" data-pin-do="buttonPin" data-pin-config="beside" data-pin-zero="true" data-pin-color="red"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_20.png" /></a>

2 个答案:

答案 0 :(得分:0)

这可以解决你的问题。

<强> HTML

<div class="pinit"><a data-pin-config="beside" href="http://pinterest.com/pin/create/button/?url=;media=" data-pin-do="buttonPin"></a>  </div>

<强> CSS

.pinit a{ 
    background-repeat:no-repeat;
    width:auto!important;
    min-width:40px!important;
}
.pinit span{
    position:relative!important;
    display:block;
    margin-left:42px!important;
    left:0!important
}

答案 1 :(得分:0)

我对此的解决方案是将Pinterest按钮放在最后。 IE最右边。