作者ofpurity (love twiggy)
看板Web_Design
标题[问题] IE8表格强制换行了
时间Tue Oct 15 19:03:17 2013
我的表格在IE8下会强制换行
IE8:
http://i.imgur.com/WfX2bLu.png
Chrome:
http://i.imgur.com/wg1NH4g.png
但在IE10 Google不会 请问问题出在哪? @-@ 研究好久
原始码 节录一小段 (表格里面有jsp 我这边删掉了)
.table_c {
width:1000px;
}
.fd_title{
background-color: #d9e0f0;
padding: 10px;
text-align: right;
border: 1px solid #CCCCCC;
width:166px;
color: #3d4c6b;
}
.fd_main{
background-color: #f5f6fa;
padding: 10px;
border: 1px solid #CCCCCC;
text-align: right;
}
<table class="table_c" >
<tr>
<th class="fd_title"></th>
<td class="fd_main"></td>
<th class="fd_title"></td>
</tr>
</table>
有jsp的原始码
http://i.imgur.com/aEFfACV.png
感谢各位~~
--
1F:→ jarry1007:我有看过研究所毕业连24个英文字母都写不出来的11/18 00:00
2F:推 n1011512:杰瑞大...英文字母是26个字...你说的那个人是你自己吗 XD11/18 00:02
3F:推 OrcaLee:原来英文字母有24个 笔记ing11/18 00:02
4F:推 bencheming:原来英文字母是24个..我念书都多念了2个...糟糕11/18 00:03
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.130.182.55
5F:推 hit1205:我知道你JSP里没错,不过这边节录的後两个th,td你打错了XD 10/16 17:13
6F:推 hit1205:我刚试了一下,这问题似乎是 IE 7 才发生 @@ 10/16 17:28
7F:→ hit1205:也就是即使 colspan 後,内文宽度仍然受到 width 影响 10/16 17:30
9F:→ hit1205:而他提供的解法则是将最外部table设定table-layout:fixed 10/16 17:39
10F:→ hit1205:而内部则只针对没有colspan的栏位设定宽度(比如说设第1列 10/16 17:40
11F:→ ofpurity:感谢!!! 10/18 01:10