On Dec 24, 10:36 am, jerry <opolots...@gmail.com> 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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to