我遇到了问题,我非常渴望获得帮助。奇怪的Chrome问题
我需要一些原因来分别渲染表头和表体。每个列和标题单元格都有相同的CSS类(例如.col1_name)。这些CSS类已经宣布宽度和文本对齐,并以这种方式我确保头和表格主体单元保持正确对齐。
而且,在IE8和Firefox中一切正常。我对WebKit浏览器(Chrome和Safari有问题,Chrome对我很重要)。它们渲染的表格主体单元格的宽度比IE和FF少5px。我无法追踪这个问题,但是我看到那些-5px宽度在Computed样式中。
下面是s-shots和一些示例代码。 IE 8 Is just fine http://img191.imageshack.us/img191/2360/probie8.png
Firefox is just fine http://img705.imageshack.us/img705/661/probff.png
Google Chrome is not so fine http://img199.imageshack.us/img199/5176/probgc.png
Inspecting element ... http://img96.imageshack.us/img96/19/probj.png
<style type="text/css">
.rbr{ width: 45px; text-align: left;}
.sifra {width: 90px; text-align: left;}
.naziv { width: 240px; text-align: left;}
.kolicina {width: 90px; text-align: right;}
.cena {width: 60px; text-align: right;}
</style>
<table id="tableheader">
<thead>
<tr>
<th class="rbr">RB.</th>
<th class="sifra">Sifra</th>
<th class="naziv">Naziv</th>
<th class="kolicina">Kolicina</th>
</tr>
</thead>
</table>
<table id="tablebody">
<tbody>
<tr>
<td class="rbr">1</td>
<td class="sifra">11111112</td>
<td class="naziv">Adelante 3 series</td>
<td class="kolicina">2.00</td>
</tr>
<tr>
<td class="rbr">2</td>
<td class="sifra">86868631</td>
<td class="naziv">Canyon CNR</td>
<td class="kolicina">1.00</td>
</tr>
</tbody>
</table>
非常感谢人的帮助!
什么是window.css? – 2009-12-28 14:01:01
在Mac OS X上,示例代码在Safari或Chrome中似乎没有出现问题。示例代码是否真的在您的系统上显示问题? – 2009-12-28 14:08:20