无法使社交媒体共享按钮在内联列表中排队 [英] Cannot get Social Media Share Buttons to Line Up in inline list

查看:91
本文介绍了无法使社交媒体共享按钮在内联列表中排队的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的生命中,我无法让这些社交媒体共享按钮与我的内联列表一起排列.我几乎在<li>上带有vertical-align: top;了,但是Chrome不太喜欢.

页面可在此处看到: http://206.72.114.49/sharelinkstest.htm

以下是完整的HTML/CSS:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        .share-links {
            margin: 8px 0 0 0;
            padding-left: 0;
            display: inline;
        }
        .share-links li {
            margin-left: 0;
            padding-right: 15px;
            list-style: none;
            display: inline;
        }
    </style>
</head>
<body>

<ul class="share-links">
    <li><a title="Post to Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="small-count" data-url="$fqUrl$post.Url"#if ($macros.IsNotNull($post.ResolvedImageUrl)) data-imageurl="$fqUrl$post.ResolvedImageUrl"#end></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></li>
    <li><a href="http://twitter.com/share" class="twitter-share-button" data-url="$fqUrl$post.Url" data-text="$post.Title by $post.User.ProperName" data-count="horizontal" data-via="lifeorganically">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></li>
    <li><iframe src="http://www.facebook.com/plugins/like.php?href=$fqUrl$post.Url&amp;layout=button_count&amp;show_faces=false&amp;width=80;&amp;action=like&amp;font&amp;colorscheme=light&amp;height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:25px;" allowTransparency="true"></iframe></li>
</ul>

</body>
</html>

解决方案

将Facebook iframe的高度设置为20px似乎可以解决问题.

For the life of me I cannot get these social media share buttons to line-up with my inline list. I nearly had it with a vertical-align: top; on the <li> but Chrome didn't like that.

Page can be seen here: http://206.72.114.49/sharelinkstest.htm

Full HTML/CSS below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style type="text/css">
        .share-links {
            margin: 8px 0 0 0;
            padding-left: 0;
            display: inline;
        }
        .share-links li {
            margin-left: 0;
            padding-right: 15px;
            list-style: none;
            display: inline;
        }
    </style>
</head>
<body>

<ul class="share-links">
    <li><a title="Post to Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="small-count" data-url="$fqUrl$post.Url"#if ($macros.IsNotNull($post.ResolvedImageUrl)) data-imageurl="$fqUrl$post.ResolvedImageUrl"#end></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></li>
    <li><a href="http://twitter.com/share" class="twitter-share-button" data-url="$fqUrl$post.Url" data-text="$post.Title by $post.User.ProperName" data-count="horizontal" data-via="lifeorganically">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></li>
    <li><iframe src="http://www.facebook.com/plugins/like.php?href=$fqUrl$post.Url&amp;layout=button_count&amp;show_faces=false&amp;width=80;&amp;action=like&amp;font&amp;colorscheme=light&amp;height=25" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:25px;" allowTransparency="true"></iframe></li>
</ul>

</body>
</html>

解决方案

Setting the height of the Facebook iframe to 20px seems to do the trick.

这篇关于无法使社交媒体共享按钮在内联列表中排队的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆