`
gongmingwind
  • 浏览: 579945 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

table td 标签中 嵌套 iframe 的问题和解决方法

    博客分类:
  • html
阅读更多
问题现象:



上部是标题,下部是广告
在ff下标题的图标是正常的,在ie却会重复。

代码如下:
<TABLE style="BORDER-TOP: #ffffff 0px solid; BORDER-LEFT: #ffffff 0px solid" cellSpacing=0 cellPadding=0 width="100%" border=0><TBODY>
<TR>
<TD vAlign=top width=28 background=http://www.51yesad.com/adsa/html/images/2_03.gif>&nbsp;</TD>
<TD vAlign=top background=http://www.51yesad.com/adsa/html/images/2_05.gif height=20><A href="http://www.51yesad.com/"><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 13px; COLOR: rgb(0,99,164); LINE-HEIGHT: 20px; TEXT-DECORATION: none">51Yes广告联盟</SPAN></A></TD>
<TD onclick=javascript:closeDiv1(); width=25 background=http://www.51yesad.com/adsa/html/images/2_06.gif>&nbsp;</TD></TR>
<tr>
<td colspan=3>
 <iframe src=''></iframe>
</td>
</tr>
</TBODY>
</TABLE>


使IE出现错位的关键代码:就是<td> 标签中嵌套了一个iframe
解决方法:
在<table> 后面添加一个table,将包含iframe的tr 移动到这个table中 ,问题就解决了
  • 大小: 4.5 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics