0

I'm working through the rails tutorial and I noticed a little bit into the application that the height of my textarea is rendering smaller than it was earlier.

I've looked through this thread here and this one as well, both essentially suggesting that the error commonly stems from not having <!DOCTYPE HTML>. However, as you'll see in my first screenshot, that's not the case for me.

In the first screenshot, you can see that when I highlight the element, it suggests that it knows it should be rendering at a thicker size, but for whatever reason it isn't. Here's what the text area should look like (taken from the bootstrap documentation).

Any help is much appreciated. Thanks!

edit: Here's the code for the view:

<% 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>
Community
  • 1
  • 1
jjl2
  • 152
  • 10
  • I might be misunderstanding, but make sure you're using text_area and not text_field if you want a multi line input. You can then provide a `rows => 10` argument to define how tall the area is, this is also commonly controlled with a CSS height attribute. Can you post your view code? – Matt Mar 22 '13 at 10:43
  • Just added it. Sorry if I wasn't specific enough. – jjl2 Mar 22 '13 at 22:26

1 Answers1

0

you can add bootstrap class in to your text_field tag as

 <%= f.text_field :email,:class=> 'input-xlarge' %>

this might be helpful

shrikant1712
  • 4,336
  • 1
  • 24
  • 42