<span>未保留内联(ShareThis)</span>

时间:2013-05-03 19:47:41

标签: html css tumblr sharethis

我已经在我的博客上安装了一个ShareThis插件已经有一段时间了,但只是注意到并非我的所有“共享图标”都显示为内联。

我尝试过使用padding-bottom和margin-bottom,但这并没有达到我的目的。

你们中的任何一个人能否解释我做错了什么?

提前问候,

杰克

网站:http://mycountry.cc/

代码段:

<div style= "display: inline; float: left; padding-left: 4px; padding-bottom: 4px;">
<span st_url='{Permalink}' st_title='{Title}' class='st_fblike' displayText='Facebook     Like'></span>
<span st_url='{Permalink}' st_title='{Title}' class='st_twitter' </span>
<span st_url='{Permalink}' st_title='{Title}' class='st_email'></span>
</div>

注意,在预览窗口中,图标保持内联。很奇怪。

Link to image!

提前致谢!

2 个答案:

答案 0 :(得分:0)

在脚本中替换此CSS类。

.stButton {
position: relative;
z-index: 1;
text-decoration: none;
color: black;
display: inline-block;
cursor: pointer;
margin-right: 3px;
margin-left: 3px;
font-size: 11px;
line-height: 26px;
}

正如您所看到的,我已将行高改为26px,现在它可以正确匹配。

答案 1 :(得分:0)

我最终使用此方法解决了我的问题:Vertical alignment of ShareThis icons

虽然在预览面板中显示奇怪,但它仍然有效。

我的下一个问题是disqus评论的对齐方式。我尝试过text-align:right和padding无济于事。我似乎也已经丢失了预先穿过整个列的线...请参阅下面的图像和代码。

    <div style="padding-bottom:1px; display: inline-block;">
    <span style="vertical-align: top;"st_url='{Permalink}' st_title='{Title}' class='st_fblike' displayText='Facebook Like'></span>
    <span style="vertical-align: top;" st_url='{Permalink}' st_title='{Title}' class='st_twitter'> </span>
    <span style="vertical-align: top;"st_url='{Permalink}' st_title='{Title}' class='st_email'></span>    

     {block:IfDisqusShortname}<div style= "display: inline-block; vertical-align: top;"><a href="{Permalink}#disqus_thread" class="comments">{lang:View comments}</a></div>{/block:IfDisqusShortname}
     {/block:Date}

Link to image!