-1

I have tried to put a div block, with class="col-md-6 col-md-offset-3", around my devise simple_form expecting that this would take 1/3 of my screen width and would be centralized (offset). It did not worked. Why ?

<div class="col-md-6 col-md-offset-3">
  <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
    <%= f.error_notification %>

    <div class="form-inputs">
      <%= f.input :email,
                  required: true,
                  autofocus: true ,
                  input_html: { autocomplete: "email" }%>
      <%= f.input :password,
                  required: true,
                  hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
                  input_html: { autocomplete: "new-password" } %>
      <%= f.input :password_confirmation,
                  required: true,
                  input_html: { autocomplete: "new-password" } %>
    </div>

    <div class="form-actions">
      <%= f.button :submit, "Sign up" %>
    </div>
  <% end %>
 </div>
Bruno Toledo
  • 87
  • 1
  • 9

1 Answers1

0

The class is offset-md-3 not col-md-offset-3

<div class="row">
  <div class="col-md-6 offset-md-3">
    ...
  </div>
</div>
Mark Merritt
  • 2,625
  • 2
  • 12
  • 16