I am using following options in my text_field_tag which is used as a search box. I want to change the width and height of the text_field tag.
<%= text_field_tag(:search, value = nil, options = {:size => "200", :placeholder => "Search Events", :class => "round shadow"})%>
I am able to get all the desired effect except for the size. As far as I know the syntax is correct. I am also using bluprint.css. Just to be sure I commented out the blueprint css textarea default options.
/*textarea {width:390px;height:250px;padding:5px;}*/
What could be the issue?
Assign an id or class to that text_field_tag
, and then set the width and height in css. Note that text_field_tag
generates a <input type="text">
, not a <textarea>
, so the css you mentioned is not modifying your tag.