简体   繁体   English

在div之间在div中创建水平空间

[英]creating horizontal space in div between divs

I'm seeking a solution to an irksome problem, have looked through previous questions but can't find a working solution. 我正在寻找一个令人讨厌的问题的解决方案,已经研究过先前的问题,但是找不到可行的解决方案。 I'm relatively new to web site development and I'm a little frustrated by such a simple issue. 我对网站开发比较陌生,对这样一个简单的问题感到有些沮丧。 Hope you can help. 希望能对您有所帮助。 TIA. TIA。

I have a social media div which will display the icons and contain the scripts, but at the moment each social media icon is directly next to or below another with no white space and it looks odd ( http://www.keyadventures.co.uk - top of page). 我有一个社交媒体div,它将显示图标并包含脚本,但此刻每个社交媒体图标都紧挨着另一个图标或下面,没有空格,而且看起来很奇怪( http://www.keyadventures.co。 uk-页面顶部)。 I'm trying to get them in a vertical pile with 10px white space between each icon. 我正在尝试将它们垂直放置,每个图标之间留有10px的空白。

The page code is: 页面代码是:

<div id="socials">
    <div class="fb-like" data-href="https://www.facebook.com/keyadventures" data-width="200" data-layout="button" data-action="like" data-size="large" data-show-faces="false" data-share="true"></div>
<div><a href="https://twitter.com/KeyAdventures" class="twitter-follow-button" data-show-count="false">Follow @KeyAdventures</a></div>
    <div><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></span></div>
    <div class="g-follow" data-annotation="none" data-height="20" data-href="//plus.google.com/u/0/102297967569531161845" data-rel="publisher">    </div>
    <div id="TA_socialButtonIcon437" class="TA_socialButtonIcon"><ul id="DgC9KwnBxX1r" class="TA_links HuiOsPByG"><li id="1UtO208Z0lf" class="aH1PNr1"><a target="_blank" href="https://www.tripadvisor.co.uk/Attraction_Review-g186326-d6132771-Reviews-Key_Adventures-Kendal_Lake_District_Cumbria_England.html"><img src="https://www.tripadvisor.co.uk/img/cdsi/img2/branding/socialWidget/20x28_green-21690-2.png"/></a></li></ul></div><script src="https://www.jscache.com/wejs?wtype=socialButtonIcon&amp;uniq=437&amp;locationId=6132771&amp;color=green&amp;size=rect&amp;lang=en_UK&amp;display_version=2"></script>
</div>

And the css code is: CSS代码是:

 #socials {
float:left;
width:260px;
padding:5px 0;
font-size:13px;
height:85px;
}

#socials img{
padding:10;
margin:10;
}

Thanks for your help. 谢谢你的帮助。

SimonMc 西蒙·麦克

you have some syntax issues in your CSS, it should like below CSS 您的CSS中有一些语法问题,它应该在CSS下方

#socials img{
  padding:10px;
  margin:10px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM