Re: How to do collection_select pulldown style="width:200px"

Marnen Laibow-Koser
Wed, 30 Dec 2009 13:23:08 -0000

Rob Bean wrote:
> DAN wrote:
>> I figured it out finally...
>>
>> ..., { :prompt => "Select Book Type..." }, {
"style" => "width:200px" }
>
> I know this is old, but I''m bumping it because it helped me out.
Also,
> one other tip for collection_select:
>
> If you don''t need the prompt, you can use this:
>
> …, {}, { "style" => "width:200px" }

But note that none of these are good ideas.  Style attributes do not
belong in good HTML.  Instead, use a separate CSS file.  (For best
results, add Sass and Compass into the mix.)

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org
--
Posted via http://www.ruby-forum.com/.

--

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