I am trying to give size properties to a drop down and select a default value. Doesn’t seem to work, on the html I see length="35" but it has no effect on the actual width. How do I do this?
@roles = ['admin','user']
collection_select(:user, :title, roles.all, :id, :name, :value => "user", {:length => 35})
collection_select(:user, :title, roles.all, :id, :name, :value => "user", {:width => 35})
You should use
:style => "width:200px"instead of :length.Or much better, to use a css class for that selection box.