我正在处理一个表的格式问题。请参阅下面表格行的屏幕截图:
下面是我的表格的html - 所以问题是如果我做一个F12并突出显示*列显示为占用了大量空间而不仅仅是我指定的5px - 然后推送验证消息当有空间可以填充时,并不是很好。我有什么傻事吗?
<table class="ui-widget-content" style="width: 565px; height: 200px; margin-top: 10px;">
<tr>
<td style="width: 10px;"></td>
<td class="label">Forename :
</td>
<td class="value">
@Html.TextBoxFor(model => model.Forename, new { id = "foreName", style = "width:150px" })
</td>
<td style="width:5px;">*</td>
<td class="field-validation-error" style="width: 180px;">
@Html.ValidationMessageFor(model => model.Forename)
</td>
</tr>
<tr>
<td style="width: 10px;"></td>
<td id="FloorText" class="label">Surname :
</td>
<td class="value">
@Html.TextBoxFor(model => model.Surname, new { style = "width:150px" })
</td>
<td style="width:5px;">*</td>
<td class="field-validation-error" style="width: 180px;">
@Html.ValidationMessageFor(model => model.Surname)
</td>
</tr>
<tr>
<td style="width: 10px;"></td>
<td class="label">Email Address :
</td>
<td class="value">
@Html.TextBoxFor(model => model.Email, new { style = "width:150px" })
</td>
<td style="width:5px;">*</td>
<td class="field-validation-error" style="width: 180px;">
@Html.ValidationMessageFor(model => model.Email)
</td>
</tr>
</table>
编辑 - 编辑问题以显示F12中代码的屏幕截图 - 它似乎是自动生成的范围 - 如何为此添加宽度?