<label class="form-control " style=" font-weight:normal; margin-left:-15px;" for="briefProjectDescription"
class="col-sm-4">
<em > *Note: If awarded funding, this description will be used in publicly available documents;
please clearly summarize the project in the third person.</em>
</label>
<textarea style=" width:72%; margin-top: 30px; margin-left:5px; padding-right: 32px; " class="requiredfield"
id="briefProjectDescription" maxlength="2000" data-bind="css: , attr: { title: briefProjectDescriptionToolTip },event: {focusout: checkLostFocus.bind($root, $data, 'briefProjectDescription')}, value: briefProjectDescription"></textarea>
我在文字区域上方有一个标签。当屏幕正常时,它很好。当窗口最小化时,标签的文本重叠在文本区域上方。谢谢!
答案 0 :(得分:0)
使用form-control
引导程序导致问题。默认情况下它为height:34px
。您必须通过将 height:auto
分配到label
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<label class="form-control col-sm-4 " style=" font-weight:normal; margin-left:-15px; height:auto;" for="briefProjectDescription">
<em > *Note: If awarded funding, this description will be used in publicly available documents;
please clearly summarize the project in the third person.</em>
</label>
<textarea style=" width:72%; margin-top: 30px; margin-left:5px; padding-right: 32px; " class="requiredfield"
id="briefProjectDescription" maxlength="2000" data-bind="css: , attr: { title: briefProjectDescriptionToolTip },event: {focusout: checkLostFocus.bind($root, $data, 'briefProjectDescription')}, value: briefProjectDescription"></textarea>