Firefox“流血”边界上的tr - bug?

时间:2011-07-18 09:40:41

标签: html css firefox html-table

我在表格中有一个表单,并且在出错时,我在错误的行周围放置一个红色边框,方法是在该行的tr元素上指定一个边框。

这在Chrome中运行得很好。但是,在Firefox(4和5)中,我看到显示屏上出现各种故障。值得注意的是,在一个案例中,我的边界在下一行的边缘“流血”。

编辑:另一个转折点是,当我向上和向下滚动时,边框向下的延伸会不可预测地变化。

此处的实时版本:http://testing.tustincommercial.com/incorporate/ (要触发错误,只需滚动到底部,然后使用“下一步”按钮提交表单。)

Screenshot:

HTML:

<tr class="registered_office_row error" id="registered_office_row">
   <th><span id="for-id_registered_office-">Registered office address:</span><div class="errorlist"><div class="erroritem">This field is required.</div></div></th>
   <td><textarea name="registered_office" cols="40" rows="10" id="id_registered_office"></textarea></td></tr>
<tr class="registration_country_row  registration_country_row" id="registration_country_row">
   <th><span id="for-id_registration_country_0-">Registration country:</span></th>
   <td><label for="id_registration_country_0" class="ui-state-active ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" aria-pressed="true" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>England and Wales</td></tr></tbody></table></span></label><input type="radio" name="registration_country" value="EW" id="id_registration_country_0" checked="checked" class="ui-helper-hidden-accessible">
      <label for="id_registration_country_1" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Wales</td></tr></tbody></table></span></label><input type="radio" name="registration_country" value="CY" id="id_registration_country_1" class="ui-helper-hidden-accessible">
      <label for="id_registration_country_2" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Scotland</td></tr></tbody></table></span></label><input type="radio" name="registration_country" value="SC" id="id_registration_country_2" class="ui-helper-hidden-accessible">
      <label for="id_registration_country_3" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Northern Ireland</td></tr></tbody></table></span></label><input type="radio" name="registration_country" value="NI" id="id_registration_country_3" class="ui-helper-hidden-accessible">
</td></tr>
<tr class="company_type_row  company_type_row" id="company_type_row"><th><span id="for-id_company_type_0-">Company type:</span></th><td>
     <label for="id_company_type_0" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Private company limited by shares</td></tr></tbody></table></span></label><input type="radio" name="company_type" value="LTD" id="id_company_type_0" class="ui-helper-hidden-accessible">
     <label for="id_company_type_1" class="ui-state-active ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" aria-pressed="true" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Private company limited by guarantee</td></tr></tbody></table></span></label><input type="radio" name="company_type" value="LTG" id="id_company_type_1" checked="checked" class="ui-helper-hidden-accessible">
     <label for="id_company_type_2" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Public limited company</td></tr></tbody></table></span></label><input type="radio" name="company_type" value="PLC" id="id_company_type_2" class="ui-helper-hidden-accessible">
     <label for="id_company_type_3" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Unlimited company with share capital</td></tr></tbody></table></span></label><input type="radio" name="company_type" value="USC" id="id_company_type_3" class="ui-helper-hidden-accessible">
     <label for="id_company_type_4" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"><span class="ui-button-text"><table class="labelcenterer"><tbody><tr><td>Unlimited company without share capital</td></tr></tbody></table></span></label><input type="radio" name="company_type" value="UWS" id="id_company_type_4" class="ui-helper-hidden-accessible">
</td></tr>

CSS生成红色边框:

.error {border-width: 1px; border-color: red; border-style: solid;}

所以,我的问题:

  1. 有没有办法阻止这种流血事件的发生?
  2. 是因为我使用某种违反标准的功能,或者在这方面是火狐车吗?

1 个答案:

答案 0 :(得分:1)

在放大FF后,我可以产生类似的结果,点击view > zoom > reset,看看是否能解决问题