html - 将 iframe 与 <p> 对齐

标签 html css iframe widget vertical-alignment

我正在使用 Twitter 小部件,此外我还想将它与我的文本对齐。不幸的是,我无法让它发挥作用。

这是我放在一起的一个 jsfiddle:http://jsfiddle.net/9bB52/

HTML:

<div id="share">
<div class="wrapper clearfix">
<p>
<b>My text here!</b>
</p>
<div class="fb-like" data-layout="button_count" data-send="false" data-show-faces="false" data-width="80"/>
<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" src="http://" class="twitter-share-button twitter-tweet-button twitter-count-horizontal" title="Twitter Tweet Button" data-twttr-rendered="true" style="width: 107px; height: 20px;"/>
<p/>
</div>
</div>

CSS:

#share {
    background: blue;
    padding: 5px 0;
    width: 100%;
    text-align: center;
    margin-bottom: 120px }

#share .wrapper {
    width: 650px;
    width: 100%;
    text-align: center; }

#share p {;
    margin-top: 2px;
    margin-right: 10px; }

#share p b {
    color: #fff; }  

#share .facebook-share, #share .twitter-share {
    float: left;
    width: 100px;
    vertical-align: top }

有人知道如何解决这个问题吗?

最佳

最佳答案

检查一下 - 希望它对您有用!

<div id="share">
<div class="wrapper clearfix">
<p>
<div style="width:250px;margin-left:auto;margin-right:auto;">    
<div style="width:120px;float:left;"><b>My text here!</b></div>
<div style="float:left" class="fb-like" data-layout="button_count" data-send="false"    data-show-faces="false" data-width="80"/>
<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true"    src="http://platform.twitter.com/widgets/tweet_button.1393899192.html#_=1394188375300&count=horizontal&id=twitter-widget-0&lang=en&original_referer=http%3A%2F%2Flocalhost%3A3000%2F&size=m&text=Be%20part%20of%20the %20Startup%20Solidarity%20Movement%20and%20get%20the%20Startup%20Pack%20for%20Marketers%20worth%20more%20than%20%245.000%20for%20free!&url=http%3A%2F%2Flocalhost%3A3000%2F"  class="twitter-share-button twitter-tweet-button twitter-count-horizontal" title="Twitter  Tweet Button" data-twttr-rendered="true" style="width: 107px; height: 20px;"/>
<p/>
</div>
</div>
</div>


#share {
    background: blue;
    padding: 5px 0;
    width: 100%;
    text-align: center;
    height:50px;
    margin-bottom: 60px }

#share .wrapper {
    width: 650px;
    width: 100%;
    text-align: center; }

#share p {;
    margin-top: 2px;
    margin-right: 10px; }

#share p b {
    color: #fff; }  

#share .facebook-share, #share .twitter-share {
    float: left;
    width: 100px;
    vertical-align: top }

看看这个:http://jsfiddle.net/9bB52/

关于html - 将 iframe 与 <p> 对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22247777/

相关文章:

html - 具有 2 个内部 Div 的容器 Div 正在闯入外部 div

html - 主菜单 html 化

javascript - 我如何破坏自动图像蒙太奇 jQuery 插件的自动调整大小功能?

javascript - 为什么当我更改 .attr ['iframeName' 时 $(window ('src' ].document.body).html() 不起作用)

javascript - 如何在我的扩展程序的新标签页中将其他扩展程序的新标签页加载为 iFrame

html - z-index 似乎不起作用

html - 将 <span> 元素和 fontawesome 图标放在同一行

jquery - Bootstrap容器流体有左右边距

javascript - 如何更改 Bootstrap Datepicker 图标?

javascript - 如何删除标准 iframe Facebook Like 按钮的 "Be the first of your friends to like this"部分?