在窗体和占位符中设置高度

时间:2016-08-19 08:34:32

标签: html css

我想在此表单组中设置高度。问题是占位符不能比现在更广泛,因此我必须提高它。因为现在占位符文本正在横向显示,我希望占位符文本在垂直线下继续。

这可能吗?

<div class="form-group">
  <label class="sr-only" for="udfordring">Største udfordring</label>
  <input type="text" class="form-control" id="udfordring" name="udfordring" placeholder="This is a long text there cannot be in the normal field" style="height:300px;"/>
</div>

1 个答案:

答案 0 :(得分:1)

<强> CSS

.navbar .navbar-form 
{
    padding-top: 0;
    padding-bottom: 0;
    margin-right: 0;
    margin-left: 0;
    border: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
}

<强> HTML

<div class="panel panel-primary shadow">
  <div class="panel-heading">SUBSCRIBE FOR NEWSLETTER OF WHOLE 10</div> <!-- id-2 for the subscribe channel-->
  <div class="panel-body">
    <form>
        <div class="form group">
      <label for="input e-mail">EMAIL</label>
      <input type="email" class="form-control" id="inputEmail" placeholder="email">
    </div>
    <div class="form group">
      <label for="input e-mail">USERNAME</label>
      <input type="email" class="form-control" id="inputEmail" placeholder="username">
    </div>

<br>
      <div class="checkbox">
      <label><input type="checkbox">REMEMBER ME</label>
    </div>
    <button type="submit" class="btn btn-primary">LOGIN</button>
  </form>`enter code here`

</div>
</div>