【问题标题】:Label's text overlaps with the text area when minimize the window最小化窗口时标签的文本与文本区域重叠
【发布时间】:2018-09-07 22:16:00
【问题描述】:
<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>

我在文本区域上方有一个标签。屏幕正常的时候就没事了。当窗口最小化时,标签的文本重叠在文本区域上方。谢谢!

【问题讨论】:

  • 我无法重现问题,您可以提供链接吗?
  • @DeepshikhaChaudhary 问题已通过以下答案解决。非常感谢您的努力。

标签: javascript css html knockout.js


【解决方案1】:

使用引导程序的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>

【讨论】:

  • 非常感谢!解决了这个问题。我会尽快接受答案。它不允许我有这么长时间。再次感谢!
  • @TrEx 不客气 :) 是的,我认为时间段是 15 分钟
猜你喜欢
  • 1970-01-01
  • 2013-03-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-11-30
  • 2021-06-26
  • 2013-03-21
  • 2013-03-24
相关资源
最近更新 更多