简体   繁体   中英

Reduce size of text_field on a form in rails and bootstrap

I'm newbie and I'm developing an app with rails and bootstrap. I'm using this to generate a field on a form:

<%= d.text_field :email, :placeholder => "email" %>
<%= text_field_tag 'doctor[name][]', nil, :placeholder => "name" %>

and it works perfectly but I want to resize the height of it. I googled and I didn't found any good answer that fits.

Does anyone faced this issue?

If you're using bootstrap v2, you should add this:

<%= d.text_field :email, :placeholder => "email", :class => "span5" %>

Note that the number in span class is referred to the size that you want to put.

If you're using this new bootstrap (v3 rc), you should check this page

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM