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

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

问题描述

我有一个页面是使用表,在FF等它的工作完美,但在IE7它导致问题,它的基本上是四个角落有一个td和img(它的圆角形式)..如果我删除从文档中的空格修复了问题..实际发生的是,它弄乱了表..它在上面的tr之间有一个细的白色线,包含2个角落和下一个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..

这是一个简单的例子。

   <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和图像是紧挨着的)

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

任何想法,我尝试设置各种css,padding 0px,marginins 0px等...

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

非常感谢。

推荐答案

修复它的唯一方法http://webdesign.about.com/cs/tables/qt/tiptablespaces.htmrel =nofollow noreferrer>删除空格。

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天全站免登陆