Javascript 在div iframe中,不以html显示

Javascript 在div iframe中,不以html显示,javascript,jquery,html,css,iframe,Javascript,Jquery,Html,Css,Iframe,在下面的代码中,左侧的div显示正确,但该iframe中的div右侧显示在div之外。它显示在顶部,但我想在div空间中显示 html <div id="details"> <div id="left"> <h2>Bangalore</h2> <img src="img/vcare_logo.png" width="100" height="83" alt="smoothy html5 templat

在下面的代码中,左侧的
div
显示正确,但该
iframe
中的
div
右侧显示在
div
之外。它显示在顶部,但我想在
div
空间中显示

html

<div id="details">
        <div id="left">
         <h2>Bangalore</h2>
    <img src="img/vcare_logo.png" width="100" height="83" alt="smoothy html5 template" hspace="50"/>
     <p><b><strong>rgd</b></strong><br>gf560032</p>
    </div>
   <div id="right">
   <h2>Upcoming News</h2>
<iframe id="NewsWindow" seamless src="news_win.htm" width="150" height="204" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" style="display: block; margin: 0 auto; padding: 0; border: #000000 1px solid;"></iframe>   
</div>
    </div>

首先,从
rgd��到rgd

然后将css更改为
#right
,删除绝对位置并使其向左浮动,如下所示:

#right {
    width: 158px;
    border: #000000 1px solid;
    background-color: #339999;
    text-align: center;
    padding: 0px 2px 7px 2px;
    visibility: visible;
    left: 100px;
    top: 100px;
    z-index:3;
    float:left;
}

右边有两个宽度,一个45%,一个158px,你们也不需要左边,你们可以使用浮动右边
#right {
    width: 158px;
    border: #000000 1px solid;
    background-color: #339999;
    text-align: center;
    padding: 0px 2px 7px 2px;
    visibility: visible;
    left: 100px;
    top: 100px;
    z-index:3;
    float:left;
}