因此,我有一个表格,有多个栏目和固定布局。 表一栏为100px宽,其他栏为6px宽。 它正确展示在Catherine、因特网探索者8和9。 但是,在IE7中,第一栏中的案文在几乎每个字之后都作了总结(尽管该栏的全文在一行中足够广泛),该栏比原来设想的要多约2-3倍。
jsfiddle:。
复制并抄录该守则,以索引.html,并在因特网探索者7和8/9中测试该守则,并将之进行比较,以了解差异:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="sk">
<head profile="http://www.w3.org/2005/10/profile">
<meta http-equiv="Content-Style-Type" content="text/css" >
<meta http-equiv="Content-Language" content="sk" >
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
<title>Test 2</title>
<style type="text/css">
#CalendarReservationsBody table.CalendarReservationsBodyTable, #CalendarHolidaysBody table.CalendarHolidaysBodyTable{
width: 100%;
border-spacing: 0px;
border-collapse: collapse;
background: #F9F5D7;
border: 1px solid #000;
table-layout: fixed;
}
#CalendarHolidaysBody table.CalendarHolidaysBodyTable{
margin-top: 1em;
width: 100%;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable th, #CalendarHolidaysBody table.CalendarHolidaysBodyTable th{
text-align: left;
font-weight: normal;
padding: 0.1em 0.5em;
border: 1px solid #000;
width: 6px;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable td.borderLeft, #CalendarHolidaysBody table.CalendarHolidaysBodyTable td.borderLeft{
border-left: 1px solid #000;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable td, #CalendarHolidaysBody table.CalendarHolidaysBodyTable td{
border: 0px;
border-bottom: 1px solid #000;
padding: 0.1em 0.5em;
width: 6px;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable td.wideRow, #CalendarReservationsBody table.CalendarReservationsBodyTable th.wideRow
,#CalendarHolidaysBody table.CalendarHolidaysBodyTable td.wideRow, #CalendarHolidaysBody table.CalendarHolidaysBodyTable th.wideRow{
width: 100px;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable thead th, #CalendarHolidaysBody table.CalendarHolidaysBodyTable thead th{
text-align: center;
font-weight: bold;
background-color: #6FA7D1;
color: #FFF;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable th.corner, #CalendarHolidaysBody table.CalendarHolidaysBodyTable th.corner{
text-align: left;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable td.highlighted, #CalendarHolidaysBody table.CalendarHolidaysBodyTable td.highlighted{
background: #FFB856;
text-align: center;
}
#CalendarReservationsBody table.CalendarReservationsBodyTable td.highlighted:hover, #CalendarHolidaysBody table.CalendarHolidaysBodyTable td.highlighted:hover{
background: #FF9000;
}
/* specialne pre tabulku - dovolenky */
#CalendarHolidaysBody table.CalendarHolidaysBodyTable th{
width: 24px;
padding: 0.1em 0;
}
#CalendarHolidaysBody table.CalendarHolidaysBodyTable td{
width: 1px;
padding: 0.1em 0;
}
</style>
</head>
<body>
<div id="CalendarReservationsBody">
<table class="CalendarReservationsBodyTable">
<thead> <tr>
<th class="corner wideRow">Auto</th> <th class="odd" colspan="4">0</th> <th class="" colspan="4">1</th> <th class="odd" colspan="4">2</th> <th class="" colspan="4">3</th> <th class="odd" colspan="4">4</th> <th class="" colspan="4">5</th> <th class="odd" colspan="4">6</th> <th class="" colspan="4">7</th> <th class="odd" colspan="4">8</th> <th class="" colspan="4">9</th> <th class="odd" colspan="4">10</th> <th class="" colspan="4">11</th> <th class="odd" colspan="4">12</th> <th class="" colspan="4">13</th> <th class="odd" colspan="4">14</th> <th class="" colspan="4">15</th> <th class="odd" colspan="4">16</th> <th class="" colspan="4">17</th> <th class="odd" colspan="4">18</th> <th class="" colspan="4">19</th> <th class="odd" colspan="4">20</th> <th class="" colspan="4">21</th> <th class="odd" colspan="4">22</th> <th class="" colspan="4">23</th> </tr>
</thead> <tbody> <tr>
<td class="alignRight wideRow">KE-260 FC - Octavia combi</td><td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td colspan="16" class="highlighted borderLeft" title="Richard Knop">
Richard Knop
</td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td colspan="14" class="highlighted" title="Richard Knop">
Richard Knop
</td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
</tr> </tbody>
</table>
</div>
</body>
</html>
我猜测这种风格需要一些 t:
#CalendarReservationsBody table.CalendarReservationsBodyTable td.wideRow, #CalendarReservationsBody table.CalendarReservationsBodyTable th.wideRow
,#CalendarHolidaysBody table.CalendarHolidaysBodyTable td.wideRow, #CalendarHolidaysBody table.CalendarHolidaysBodyTable th.wideRow{
width: 100px;
}