我正在尝试将标签:控件,标签:控件对齐 2 行。
但是我的第二行中的文本如下图所示移动到了一点点。如何在第二行的同一行中对齐标签和控件?这些是通用形式,所以我不想在类中添加任何高度。任何帮助将不胜感激。
<div class="editor-label"><label for="DocumentSignature">This is a test label with big text below and below</label></div>
<div class="editor-field"><input class="text-box single-line" data-val="true" data-val-required="The Document Signature Services Request URL field is required." id="DocumentSignature" name="DocumentSignature" type="text" value="">
<span class="field-validation-valid" data-valmsg-for="DocumentSignature" data-valmsg-replace="true"></span></div>
<div class="editor-label"><label for="DealSummary">This is next div text which moved to right</label></div>
<div class="editor-field"><input class="text-box single-line" data-val="true" data-val-required="The Deal Summary Template URL field is required." id="DealSummary" name="DealSummary" type="text" value=""> <span class="field-validation-valid" data-valmsg-for="DealSummary" data-valmsg-replace="true"></span></div>
.editor-label {
max-width: 150px;
font-weight: 200;
font-size: 14pt;
letter-spacing: 0.01em;
line-height: 22pt;
float: left;
display: block;
}
.editor-field {
padding-bottom: 10px;
line-height: 22pt;
font-size: 10pt;
clear: right;
}
.label {
width: 180px;
display: block;
text-align: right;
margin-right: 15px;
}