Radio buttons in bootstrap

126 views
Skip to first unread message

bertly_the_coder

unread,
Mar 1, 2014, 9:13:55 AM3/1/14
to rubyonra...@googlegroups.com
Hi guys,

I'm using Bootstrap 3 with Rails 4 and having a bit of trouble aligning my horizontal radio-buttons. In my HAML I have this line

.row
   .col-md-12    
      =f.association :search_engine, as: :radio_buttons, item_wrapper_class: 'radio-inline', label: false
 
but when I load the page, I get as attached: 

How can I fix this?


Walter Lee Davis

unread,
Mar 1, 2014, 9:56:47 AM3/1/14
to rubyonra...@googlegroups.com
I think you need form-inline on the parent of the radio buttons. Something like this (in HTML, can't read HAML)

<div class="form-inline">
<label class="radio-inline">
<input type="radio">
</label>
<label class="radio-inline">
<input type="radio">
</label>
<label class="radio-inline">
<input type="radio">
</label>
</div>

Walter


>
> How can I fix this?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0cac56be-c708-445f-834e-62d435cbe12c%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

muchira k.

unread,
Mar 1, 2014, 8:04:38 PM3/1/14
to rubyonra...@googlegroups.com
Beautiful! That worked....thx!


You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/rI5fj4jm2gs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.




--
Clarity is self-created. The universe is waiting on you, not the other way around - Me.

“Life isn't about finding yourself. Life is about creating yourself.” - G. Bernard Shaw

"Life is what happens while you are busy making plans" - John Lennon

NAMASTE!!!!! Yeah I said it!!
Reply all
Reply to author
Forward
0 new messages