views:

77

answers:

1

I am trying to resize my text area tag though when I try to make the adjustments nothing happens to the box itself.

I have tried:

<%= text_area_tag :reason, :nil, :size=> "44x6" %>

<%= text_area_tag :reason, :nil, :cols=>20,:rows=>5 %>

Any ideas? Thanks.

+1  A: 

Both versions work for me, tried just now. Can you post html generated by them?

Nikita Rybak
How will you pay for your time off? <select id="first" name="first"><option value="Employee">Employee</option> <option value="Manager">Manager</option> <option value="Supervisor">Supervisor</option> <option value="Tier-1">Tier-1</option></select> <textarea cols="5" id="reason" name="reason" rows="15">nil</textarea> </form>
RoR
The code in my view. <%= text_area_tag :reason, :nil, :size=> "5x15" %>
RoR
So the textarea gets generated as you would expect: `cols="5"` `rows="15"` What is the problem?
captaintokyo
In my view nothing changes, like when i refresh that page. the box stays the same. So when I try to change the :size=>"15x20" it looks the same.
RoR
Hm, do you have a stylesheet that controls the size of the textarea? Check you stylesheet for `textarea { width: ...px; height: ...px; }`
captaintokyo
@RoR So, it looks like issue has little to do with rails (html is generated correctly). Can you post a full html source reproducing problem?
Nikita Rybak
http://pastie.org/1135308 - Copied the HTML Source to Pastie
RoR
@RoR works for me: http://jsfiddle.net/htzyy/ Maybe it's something about styles, as _captaintokyo_ suggested.
Nikita Rybak
Thanks for verifying. I did go through my CSS Stylesheets and I did find a textarea. I went ahead and commented it out. But, looking back at the view, the text area does not change at all. I'm gonna try a fresh rails test_project and see from scratch if i get this problem.
RoR
Works in a new application.
RoR
It is conflicting with something inside of Blueprint. After I commented out the 3 includes for blueprint. The Text area now can be resized.
RoR
Thanks for all the help, issue fixed. I had to override textarea due to blueprint.
RoR