如何在中心并排放置 2 个 iframe?

How to sit 2 iframes side by side in the center?

我试图并排放置 2 个 iframe,并将它们都放在页面的中央。围绕它们的 DIV 将所有文本等置于中央,但 iframe 根据对齐标记位于左侧或右侧,但不位于中间。

HTML:

<div class="box">
    <iframe src="iframe content" width="64" height="65" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" align="left">
    </iframe>
</div>
<div class="box">
    <iframe allowtransparency="true" frameborder="0" scrolling="no" src="iframe content" style="height:20px;" align="right">
    </iframe>
</div>

CSS:

.box iframe{
    display:inline-block;
}   

.clear{
    clear:both;
}

您可以添加

.box{ text-align:center;}

对于 iframe,您也可以使用 float left。或者甚至 display: inline-block 也可以。