Styling a wrapper component

19 views
Skip to first unread message

erwin

unread,
May 14, 2012, 11:59:40 AM5/14/12
to SimpleForm
It seems I cannot style a component directly in the initializer
( useful in this case to align inline labels with input fields

b.wrapper :tag => 'div', :class => 'controls' do |ba|
ba.use :label, :wrap_with => { :tag => :span, :class =>
'left' , :style => 'padding-top: 5px;' }

the generated span tag get only the class 'left'

so I guess I have to define a specific class ? is that true ?

thanks for feedback

Carlos Antonio da Silva

unread,
May 14, 2012, 12:20:15 PM5/14/12
to plataformate...@googlegroups.com
Only :tag and :class are valid for such configurations, other attributes are just discarded. You can probably achieve what you want with a css class instead.

-- 
At.
Carlos Antonio

Reply all
Reply to author
Forward
0 new messages