在Firefox上的表中边框折叠的不同厚度

时间:2014-04-03 20:12:33

标签: html css firefox border

在Firefox中,我有一个表格,当应用边框折叠时,边框的厚度不同。但是这个问题不会在Chrome中出现。

表格的HTML和CSS代码:

//HTML
<div id="divTabela">
    <table width="100%" cellpadding="4" border="1" name="tabelainfo" id="tabelainfo" class="bordasimples">
        <tbody>
            <tr id="titulotabela">
                <th colspan="1" rowspan="1">Data Inicial</th>
                <th colspan="1" rowspan="1">Data Final</th>
                <th colspan="1" rowspan="1">Distribuidor</th>
                <th colspan="1" rowspan="1">Agendar</th>
                <th colspan="1" rowspan="1">Ver Detalhes</th>
            </tr>
            <tr id="corpotabela">
                <td align="center" colspan="1" rowspan="1">####</td>
                <td align="center" colspan="1" rowspan="1">####</td>
                <td align="center" colspan="1" rowspan="1">####</td>
                <td align="center" colspan="1" rowspan="1"></td>
                <td align="center" colspan="1" rowspan="1"><div title="Ver Detalhes"><a href="#"><div></div></a></div></td>
            </tr>
            <tr id="corpotabela"><td align="center" colspan="1" rowspan="1">####</td>
                <td align="center" colspan="1" rowspan="1">####/td>
                <td align="center" colspan="1" rowspan="1">####</td>
                <td align="center" colspan="1" rowspan="1"></td>
                <td align="center" colspan="1" rowspan="1"><div title="Ver Detalhes"><a href="#"><div></div></a></div></td>
            </tr>
        </tbody>
    </table>
    <br>
</div>



//CSS
table.bordasimples {border-collapse: collapse;}
table.bordasimples tr td {border:1px solid;}
table.bordasimples tr th {border:1px solid;}

#tabelainfo {
    padding-top: 0px;
    font-size: 12px;
    font-family: Calibri;
    text-align: justify;
    border-top-color: #FFFFFF;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
    border-left-color: #FFFFFF;
    color: #083c06;
    text-decoration: none;
}

请参阅下图中的表格行: enter image description here

1 个答案:

答案 0 :(得分:4)

我只是更改了CSS代码解决了问题:

table.bordasimples {
    border-spacing: 0px;
    border:1px solid #D2DDD4;
}
table.bordasimples tr td, table.bordasimples tr th
{border:1px solid #D2DDD4;}

我为边框间距替换了边框折叠并更改了边框的颜色,现在我的桌子就是我想要的方式,并且布局更好。

谢谢大家!