vendredi 30 novembre 2018

Add padding to bootstrap elements

Rails 3.2
Bootstrap 3

In my view (app/views/users/password_expired/show.html.slim), I have:

- content_for :page_header do
     = t('users.passwords.create_password')
   = form_for(resource, as: resource_name, url: [resource_name, :password_expired], html: {method: :post, class: "form-horizontal new_user"}) do |f|
     .form-horizontal-column.wide
       .form-group
         = devise_error_messages!
       .form-group style="width: 600px"
         = f.label :current_password, t('users.passwords.current_password')
         = f.password_field :current_password
       .form-group style="width: 600px"
         = f.label :password, t('users.passwords.new_pass')
         = f.password_field :password
       .form-group style="width: 600px"
         = f.label :password_confirmation, t('users.passwords.confirm_new_password')
         = f.password_field :password_confirmation
       div= f.submit t('users.passwords.change_my_password'), :class => "btn btn-primary btn-lg"
     .form-horizontal-column.shared-links

I was expecting to see some padding, in between the labels/input fields, and the left side of the form, but I don't have any. It seems all the other forms are working fine.

How can I added some padding, to the left of the form-group, without modifying the bootstrap style, as the latter is working everywhere else?

Aucun commentaire:

Enregistrer un commentaire