0
我正在通过rails教程,我注意到一点点的应用程序,我的textarea的高度呈现比以前更小。文本字段太窄垂直与自举/导轨
我已经看过这个thread here和this one as well,基本上都表明这个错误通常源于没有<!DOCTYPE HTML>
。但是,正如您在我的first screenshot中看到的那样,我不是这种情况。
在第一张截图中,您可以看到当我突出显示元素时,表明它知道它应该以较粗的尺寸渲染,但无论出于何种原因,它都不是。 Here's what the text area should look like(取自bootstrap文档)。
任何帮助,非常感谢。谢谢!
编辑: 下面是视图代码:
<% provide(:title, "Sign in") %>
<h1>Sign in</h1>
<div class="row">
<div class="span6 offset3">
<%= form_for(:session, url: sessions_path) do |f| %>
<%= f.label :email %>
<%= f.text_field :email %>
<%= f.label :password %>
<%= f.password_field :password %>
<%= f.submit "Sign in", class: "btn btn-large btn-primary" %>
<% end %>
<p>New user? <%= link_to "Sign up now!", signup_path %></p>
</div>
</div>
我可能误解,但如果你想要多行输入,请确保你使用的是text_area而不是text_field。然后,您可以提供'rows => 10'参数来定义该区域的高度,这通常也通过CSS高度属性进行控制。你能发布你的视图代码吗? – Matt 2013-03-22 10:43:59
刚添加它。对不起,如果我不够具体。 – jjl2 2013-03-22 22:26:53