看板 Web_Design 關於我們 聯絡資訊
我的表格在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 感謝各位~~ --
jarry1007:我有看過研究所畢業連24個英文字母都寫不出來的11/18 00:00
n1011512:傑瑞大...英文字母是26個字...你說的那個人是你自己嗎 XD11/18 00:02
OrcaLee:原來英文字母有24個 筆記ing11/18 00:02
bencheming:原來英文字母是24個..我唸書都多唸了2個...糟糕11/18 00:03
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.130.182.55
hit1205:我知道你JSP裡沒錯,不過這邊節錄的後兩個th,td你打錯了XD 10/16 17:13
hit1205:我剛試了一下,這問題似乎是 IE 7 才發生 @@ 10/16 17:28
hit1205:也就是即使 colspan 後,內文寬度仍然受到 width 影響 10/16 17:30
hit1205:照 http://goo.gl/ZAbnuv 的說法,這狀況確實IE8beta也會有 10/16 17:38
hit1205:而他提供的解法則是將最外部table設定table-layout:fixed 10/16 17:39
hit1205:而內部則只針對沒有colspan的欄位設定寬度(比如說設第1列 10/16 17:40
ofpurity:感謝!!! 10/18 01:10