网页内嵌框架,怎么改坐标位置?div style

来源:百度知道 编辑:UC知道 时间:2024/05/21 17:44:28
我有个小网站, 是HTML的. 内嵌了两个小框架. 一个是天气.一个是日历.
现在我镶嵌进去之后. 两个框架是垂直摆放的. 怎样将两个框架并排横着摆放?

<div style="border:1px dotted #008080; position: absolute; width: 201px; height: 221px; z-index: 1; left:

1px; top: 1px" id="layer1">
<iframe name="I1" src="http://weather.news.qq.com/inc/ss103.htm" width="210" height="225"

border="0" frameborder="1">

<div style="border:1px dotted #008080; position: relative; top: 400px; left: 221px; z-index: 1; left: 1px;

top: 1px" id="layer1">
<iframe name="I2" src="http://www.lzsq.net/wnl.htm" width="210" height="225" border="0" frameborder="1">

<div style="border:1px dotted #008080;position:absolute;z-index:2;left:220px;top:1px;" id="layer2">
<iframe name="I1" src="http://weather.news.qq.com/inc/ss103.htm" width="210" height="225" border="0" frameborder="1" />
</div>
<div style="border:3px dotted #008080;position:absolute;width:201px;height:221px;z-index:1;left:1px;top:1px" id="layer1">
<iframe name="I2" src="http://www.lzsq.net/wnl.htm" width="210" height="225" border="0" frameborder="1" />
</div>

首先,纠正一下楼主的一些小错误。
1.div和iframe都需要封口,也就是标签的闭合,比如<div>..</div>和<iframe>...</iframe>
2.定位的方法不对,