HTML和CSS:放置Google +1按钮使得无法在元素之间添加空间

时间:2013-05-30 16:00:12

标签: html css google-plus

我尝试将此代码段添加到我的html页面:

<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone" data-size="tall" data-annotation="inline" data-width="300"></div>

<div style="background-color: red; float:left; padding-left: 125px; margin-left: 125px;">
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
</div>

它将+1按钮放在那里,但没有在按钮的左边放置任何空白区域。我在这个页面上测试它: http://www.problemio.com/business/how_to_get_business_ideas.php

因此,您可以看到所有其他社交按钮之间有空格,但+1按钮却没有。

有人知道如何添加空间吗?

谢谢, 亚历

1 个答案:

答案 0 :(得分:1)

margin-left: 25px表上的

#plusone_table应该可以解决问题。