TD 的表和空格的 IE 错误? [英] IE bug with TD's tables and whitespace?

查看:7
本文介绍了TD 的表和空格的 IE 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用表格的页面,在 FF 等中它工作得很好,但在 IE7 中它会导致问题,基本上是四个角有一个 td 和 img(它是圆角形式)..如果我删除文档中的空格解决了问题.. 实际发生的情况是它弄乱了表格.. 它在包含 2 个角的上 tr 和下一个 tr 之间放置了一条细白线

I have a page that is using tables, in FF etc it works perfect, but in IE7 it causes issues, it's basically where the four corners have a td and and img (its a rounded corner form) .. if I remove the whitespace from the document it fixes the issue.. What actually happens is that it messes up the tables.. it puts a thin white line between the upper tr that holds the 2 corners and the next tr

我需要删除 img 和 TD 之间的空格,是否有更好的解决方法,因为我有很多,不仅如此,如果我重新格式化文档,问题就会返回..

I need to remove the the whitespace between the img and the TD, is there a better work around, as I have lots and not only that if I reformat the document the problem returns..

这是一个简单的例子..

Here is a simple example..

   <table width="100%" height="418" border="0" cellpadding="0" cellspacing="0" bgcolor="#F04A23"
            style="margin: 0px; padding: 0px">
            <tr>
                <td width="12" align="left" valign="top">
                    <img src="content/images/corner_left.gif" width="12" height="12" />
                </td>

如您所见,img 和 td 之间有空白...我将其删除,使其看起来像这样:

as you can see there is white space between img and td... and I remove it so it looks like this:

<img src="content/images/corner_left.gif" width="12" height="12" /></td>

问题解决了,(注意 td 和 image 是紧挨着的)

the problem is gone, (notice the td and image are right next to each other)

任何想法,我尝试设置各种css,填充0px,边距0px等......

Any ideas, I tried setting all sorts of css, padding 0px, margins 0px etc ...

任何想法都非常感谢.

推荐答案

修复它"的唯一方法(我用这个词比较松散)是 删除空格.

The only way to "fix it" (and I use that term loosely) is to remove the whitespace.

更重要的是,你应该停止制作像 2001 年那样的网站.:)

More importantly, you should stop making websites like it's 2001. :)

这篇关于TD 的表和空格的 IE 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆