On Dec 24, 10:36 am, jerry
<opolots...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Am trying to build a search form but i want different select boxes to
> have different widths.when i use the
> select{
> width:100%} in css it affects all select boxes in the application and when
i try
>
> using css classes for instance select.search{width 100%} then try to
> add a class inside the select tag in my rails app
> <%=f.select(:source, options_for_select(@SourceList) ,:prompt =>
> "Source",:class=>"search")%>
> it doesn''t work.Am new in rails and need help to go around this.
select expects up to two hashes of options - the first are options for
the select method itself (like prompt), and the second hash is for
html options (class, style etc.).
Also you I don''t think you should be using options_for_select here -
select calls it for you (but that argument should be something that
options_for_select would understand).
Fred
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.