Home  >  Article  >  Web Front-end  >  There is a compatibility issue with the form, please give me some advice~! So sad_html/css_WEB-ITnose

There is a compatibility issue with the form, please give me some advice~! So sad_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:19:221015browse

2c1c01fe3da5b45638b932defb4b63fc
acf251eef30dadcd95fda0b63932cc24
93f0f5c25f18dab9d176bd4f6de5d30e
efd2567c1fb77e16e60d87a2c199ee8e
b2386ffb911b14667cb8f0f91ea547a7无标题文档6e916e0f7d1e588d4f442bf645aedb2f
9c3bca370b5104690d9ef395f2c5f8d1

ddf4dd2e1e3b88177fbb8ff1f88a61d1
  a34de1251f0d9fe1e645927f19a896e8
    052a4fd4a21feff1cd1c32d59984a180 b90dd5946f0946207856a8a37f441edf
    dc70154fac32af82c1e235ebc9e135c8 b90dd5946f0946207856a8a37f441edf
  fd273fcf5bcad3dfdad3c41bd81ad3e5
  a34de1251f0d9fe1e645927f19a896e8
    f02174fa8b4dc0096e8185e25d7b77f5e388a4556c0f65e1904146cc1a846beesfsdfdfdsfdsf94b3e26ee717c64999d7867364b1b4a3b90dd5946f0946207856a8a37f441edf 
  fd273fcf5bcad3dfdad3c41bd81ad3e5
f16b1740fad44fb09bfe928bcc527e08


36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e


在IE下, 第一行的第二个td设置了高为10,为什么显示不正常呢?


回复讨论(解决方案)

把e388a4556c0f65e1904146cc1a846bee94b3e26ee717c64999d7867364b1b4a3标签去掉就一样了。

在IE下, 第一行的第二个td设置了高为10,为什么显示不正常呢?
IE就是个怪胎,我折腾了1个多小时Google百度的方法都试过了都没办法将第二个td的高度设为10px。
Chrome浏览器倒是很听话。

终于找到解决方案了:请看下面的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><table width="100%" border="1" cellpadding="0" cellspacing="0">  <tr>    <td rowspan="2" width="100px" height="200px" bgcolor="#990033"> </td>    <td id="td10" style="font-size:10px;line-height:10px;height:10px" bgcolor="#FFFF00"> </td>  </tr>  <tr>     <td height="190px" bgcolor="#CC0033"><p style="margin-top">sfsdfdfdsfdsf</p></td>   </tr></table></body></html>

关键点:
1.表格的height="100%"属性去掉。
2.第二个td添加样式属性:style="font-size:10px;line-height:10px;height:10px"
3.第三个td设置属性:height="190px"。
最简化的代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><table width="100%" border="1" cellpadding="0" cellspacing="0">  <tr>    <td rowspan="2" width="100px" height="200px" bgcolor="#990033"> </td>    <td style="font-size:10px;line-height:10px;height:10px" bgcolor="#FFFF00"> </td>  </tr>  <tr>     <td height="190px" bgcolor="#CC0033"><p>sfsdfdfdsfdsf</p></td>   </tr></table></body></html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn