0

I'm new to Ruby and programming in general. I'm creating this log in page using simple form but the Create account button is to close to the confirm password form I don't know how to enter a break between these two.

Thank you!

 <%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal'}) do |f| %>
  <%= devise_error_messages! %>

  <%= f.input :email, :label => 'Correo Electronico' %>

  <%= f.input :password, :label => 'Contraseña' %>
  <%= f.input :password_confirmation, :label => 'Confirmar Contraseña' %>



  <div>
    <%= f.submit "Crear cuenta", class: "btn btn-primary" %>
  </div>
<% end %>
Yule
  • 9,668
  • 3
  • 51
  • 72
Starchest
  • 35
  • 6

1 Answers1

0

You should use a HTML class/id and put these rules in a CSS file. But there is 2 ways:

The quick & diry way:

<div style="margin-top: 15px;">
  <%= f.submit "Crear cuenta", class: "btn btn-primary" %>
</div>

The proper way:

# app/assets/stylesheets/application.css.scss (or extension can be .sass)
body div.form_action_buttons {
  margin-top: 15px;
}

# your view
<div class='form_action_buttons'>
  <%= f.submit "Crear cuenta", class: "btn btn-primary" %>
</div>    
MrYoshiji
  • 54,334
  • 13
  • 124
  • 117