我需要减少两个输入字段之间的空间,以下是我的属性,我尝试更改页边距但没有起作用。请建议
.SecValue {
display: inline-block;
float: right;
height: 20px;
max-width: 90px;
min-width: 70px;
text-align: left;
color: #666666;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, Sans-serif;
word-wrap: break-word;
font-weight: bold;
padding: 0px;
margin-bottom: 6px;
text-transform: uppercase;
}
<tr class="selectheight5">
<td class="tdLabelWidth">
<form:label class="sectionLabel" path="">Code</form:label>
</td>
<td class="tdInputWidth">
<form:select id="formState">
<form:option value="0">Select</form:option>
<form:option value="RE">RE</form:option>
</form:select>
<form:input class="SecValue" id="formcode" type="search" maxlength="5" />
<form:label id="errorformState" class="sectionError" path=""></form:label>
<form:label id="errorformcode" class="sectionError" path=""></form:label>
</td>
</tr>
答案 0 :(得分:1)
您只需删除float: right
.SecValue {
display: inline-block;
/*float: right;*/
height: 20px;
max-width: 90px;
min-width: 70px;
text-align: left;
color: #666666;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, Sans-serif;
word-wrap: break-word;
font-weight: bold;
padding: 0px;
margin-bottom: 6px;
text-transform: uppercase;
}
<tr class="selectheight5">
<td class="tdLabelWidth">
<label class="sectionLabel" path="">Code</label>
</td>
<td class="tdInputWidth">
<select id="formState">
<option value="0">Select</option>
<option value="RE">RE</option>
</select>
<input class="SecValue" id="formcode" type="search" maxlength="5" />
<label id="errorformState" class="sectionError" path=""></label>
<label id="errorformcode" class="sectionError" path=""></label>
</td>
</tr>