在 chrome 和 firefox 等浏览器中通常不设置输入字段宽度。请参阅下面的代码
<table border="1" align="left" cellpadding="0" cellspacing="0" width="25%" style="margin-top: -90px;">
<tr>
<td colspan="3"><input id="ir-box" type="checkbox"/>Only show LIVE reports</td><td></td>
</tr>
<tr>
<td colspan="3"><input type="text" value="Keyword Search"/></td><td>{% include "buttons/go.html" %}</td>
</tr>
<tr>
<td colspan="4"><input id="incident-types"class="incident-type" type="text" value="All Incident types" /></td>
</tr>
<tr>
<td colspan="4"><input id="location-types"class="incident-type" type="text" value="All Location types"/></td>
</tr>
<tr>
<td colspan="2">From</td><td colspan="2">To</td>
</tr>
<tr>
<td colspan="2" width="30"><input class="datefield" id="fromdate" type="text" value="dd/mm/yyyy"/></td><td colspan="2" width="150"><input class="datefield" id="todate" type="text" value="dd/mm/yyyy"/></td>
</tr>
<tr>
<td></td><td></td><td></td><td>{% include "buttons/go.html" %}</td>
</tr>
</table>
css。
.datefield {
padding:0;
margin:0;
width:80px;
height:20px;
}
.incident-type {
padding:0;
margin:0;
width:250px;
height:20px;
}
我可以知道如何解决这种兼容性问题。
谢谢