Hi, Could anyone tell me what I''m doing wrong below when trying to apply a style to the following label and text field <div class="group"> <%= f.label :name, :html => {:class => "label"} %> <%= f.text_field :name, :html => {:class => "label"} %> </div> Doesn''t work at all, the form however picks up the right style when I use this code ... <% form_for [:admin, @organisation], :html => {:class => "form"} do | f| %> Thanks in advance! Richie. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hey Richard, Just use <%= f.text_field :name, :class => "label" %> On Mon, Nov 1, 2010 at 6:15 PM, Creative Technologist < richard-DXT9u3ndKiRtdF/iL03xVL6Z9KU14Uj5tUK59QYPAWc@public.gmane.org> wrote:> Hi, > > Could anyone tell me what I''m doing wrong below when trying to apply a > style to the following label and text field > > <div class="group"> > <%= f.label :name, :html => {:class => "label"} %> > <%= f.text_field :name, :html => {:class => "label"} %> > </div> > > Doesn''t work at all, the form however picks up the right style when I > use this code ... > > <% form_for [:admin, @organisation], :html => {:class => "form"} do | > f| %> > > Thanks in advance! > > Richie. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- - Adão Raul + (11) 6967.3198 + http://dowcore.me + メガマンのウェブ開発者 -- 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.
Creative Technologist wrote in post #958582:> Hi, > > Could anyone tell me what I''m doing wrong below when trying to apply a > style to the following label and text field > > <div class="group"> > <%= f.label :name, :html => {:class => "label"} %> > <%= f.text_field :name, :html => {:class => "label"} %> > </div>Read the docs for the label method again, and follow the syntax there. You''re not specifying the options hash like it expects. 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.