jeudi 18 avril 2019

How can i display my radio_button checkbox + label on the same line

I can't align label + radio_buttoms on my simple_form. I tried almost everything by adding some classes + display : inline-flex ...

I tried to put classe though wrapper_html, import_html + display flex / display : inline-flex ....

<%= simple_form_for (@dog), html: { multipart: true } do |f| %>
   <div class="row">
          <div class="col-xs-12 cols-sm-12 legend-radio-buttons">
          <%= f.input :experience,
               as: :radio_buttons,
               label:"A t-il déjà ?",
               collection: [['0', 'Non'], ['1', 'Oui']],
                label_method: :second,
                value_method: :first,
                import_html: {class: 'radio_buttons'}
                    %>
           </div>
       </div>

CSS

form-check {
    display: inline-block;
 }

 .col-form-label.pt-0{
 font-family: "Roboto Condensed" !important;
 font-size: 14px !important;
  }


.radio_buttons {
    font-family: "Roboto Condensed";
    font-size: 15px !important;
}

.form-check-input.radio_buttons.optional {
    margin-right: 10px;
 }

I would like something like this (radio_buttons are represent by + ) :

     A t-il déjà ?    Oui +     Non +

Aucun commentaire:

Enregistrer un commentaire