diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml
index 9e7751830a4477d972ae68484a8d8466d076c3ae..8de2ba74a79bf77c85882613c7b9e98bfa5ac7ed 100644
--- a/app/views/admin/groups/_form.html.haml
+++ b/app/views/admin/groups/_form.html.haml
@@ -12,8 +12,7 @@
 
   - if @group.new_record?
     .form-group
-      .col-sm-2
-      .col-sm-10
+      .col-sm-offset-2.col-sm-10
         .alert.alert-info
           = render 'shared/group_tips'
     .form-actions
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index 4c2865ac3f223d1e946feadbeec82fef1cf12ba2..5260eadf95b29171fa83bba3e3cb1fc78e6901ca 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -92,8 +92,7 @@
               = namespace_select_tag :new_namespace_id, selected: params[:namespace_id], class: 'input-large'
 
           .form-group
-            .col-sm-2
-            .col-sm-10
+            .col-sm-offset-2.col-sm-10
               = f.submit 'Transfer', class: 'btn btn-primary'
 
   .col-md-6
diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml
index 85179d4c4a2b97e706ebe610b8dae847c93db298..aa13ed85b530cd22b0874756ce6eac184ac1e85b 100644
--- a/app/views/groups/edit.html.haml
+++ b/app/views/groups/edit.html.haml
@@ -11,8 +11,7 @@
       = render 'shared/group_form', f: f
 
       .form-group
-        .col-sm-2
-        .col-sm-10
+        .col-sm-offset-2.col-sm-10
           = image_tag group_icon(@group), alt: '', class: 'avatar group-avatar s160'
           %p.light
             - if @group.avatar?
diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml
index edb882bea19a24deef769ffee0d59a48f67e6ef2..0665cdf387afb7ea3dc7e00dbe596b69e0794a2b 100644
--- a/app/views/groups/new.html.haml
+++ b/app/views/groups/new.html.haml
@@ -13,8 +13,7 @@
       = render 'shared/choose_group_avatar_button', f: f
 
   .form-group
-    .col-sm-2
-    .col-sm-10
+    .col-sm-offset-2.col-sm-10
       = render 'shared/group_tips'
 
   .form-actions
diff --git a/app/views/help/_shortcuts.html.haml b/app/views/help/_shortcuts.html.haml
index ae072bacfb17888e6c2cd5f941b8e63bca184e04..825acb0ae3eb34d59c967179765def73836d4e4c 100644
--- a/app/views/help/_shortcuts.html.haml
+++ b/app/views/help/_shortcuts.html.haml
@@ -1,4 +1,4 @@
-#modal-shortcuts.modal.hide{tabindex: -1}
+#modal-shortcuts.modal{tabindex: -1}
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml
index 4ec50f3589078fb33594a26e82b9b91ff01ff07f..1403b86f377144220095a8a4ab910a18fcaa8b50 100644
--- a/app/views/layouts/header/_default.html.haml
+++ b/app/views/layouts/header/_default.html.haml
@@ -5,7 +5,7 @@
         = brand_header_logo
         %h3 GitLab
     .header-content
-      %button.navbar-toggle
+      %button.navbar-toggle{type: 'button'}
         %span.sr-only Toggle navigation
         = icon('bars')
 
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index 6534afb0e8906b1eb09ae91bd5042bc56d62b30a..37a3952635eaf5c76b93241cd7f0835215b141ef 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -109,6 +109,5 @@
   .row
     .col-md-7
       .form-group
-        .col-sm-2  
-        .col-sm-10
+        .col-sm-offset-2.col-sm-10
           = f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/projects/_bitbucket_import_modal.html.haml b/app/views/projects/_bitbucket_import_modal.html.haml
index 07d4d602769b7d07fdd6f5968f3e93c9c6990cd2..745163e79a79733f5052403dd824a9bd6ff23139 100644
--- a/app/views/projects/_bitbucket_import_modal.html.haml
+++ b/app/views/projects/_bitbucket_import_modal.html.haml
@@ -1,4 +1,4 @@
-%div#bitbucket_import_modal.modal.hide
+%div#bitbucket_import_modal.modal
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/projects/_github_import_modal.html.haml b/app/views/projects/_github_import_modal.html.haml
index e88a0f7d6899263da37682cf0625f9cc8c9fa31a..de58b27df238fe1c65293808835c41b280af4f30 100644
--- a/app/views/projects/_github_import_modal.html.haml
+++ b/app/views/projects/_github_import_modal.html.haml
@@ -1,4 +1,4 @@
-%div#github_import_modal.modal.hide
+%div#github_import_modal.modal
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/projects/_gitlab_import_modal.html.haml b/app/views/projects/_gitlab_import_modal.html.haml
index 52212b6ae025f12132985f407da71caf2ce9936e..ae6c25f9371c148e7560dc99b60b0a253fd3fcad 100644
--- a/app/views/projects/_gitlab_import_modal.html.haml
+++ b/app/views/projects/_gitlab_import_modal.html.haml
@@ -1,4 +1,4 @@
-%div#gitlab_import_modal.modal.hide
+%div#gitlab_import_modal.modal
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml
index 491e2107da436a351f4fec8ab896f76574e1452c..4d93c89c93a03117aa68074722656be3a66460c6 100644
--- a/app/views/projects/_issuable_form.html.haml
+++ b/app/views/projects/_issuable_form.html.haml
@@ -1,6 +1,6 @@
 - if issuable.errors.any?
   .row
-    .col-sm-10.col-sm-offset-2
+    .col-sm-offset-2.col-sm-10
       .alert.alert-danger
         - issuable.errors.full_messages.each do |msg|
           %span= msg
diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml
index 09559a4967b929b0a0a8c61754587dc6bf26c6e6..b8d8451880adb3c659477c38f4aa8ca67a54ec48 100644
--- a/app/views/projects/blob/_remove.html.haml
+++ b/app/views/projects/blob/_remove.html.haml
@@ -1,4 +1,4 @@
-#modal-remove-blob.modal.hide
+#modal-remove-blob.modal
   .modal-dialog
     .modal-content
       .modal-header
@@ -13,8 +13,7 @@
           = render 'shared/commit_message_container', params: params,
                    placeholder: 'Removed this file because...'
           .form-group
-            .col-sm-2
-            .col-sm-10
+            .col-sm-offset-2.col-sm-10
               = button_tag 'Remove file', class: 'btn btn-remove btn-remove-file'
               = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
 
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 2765f63c6bc9737ac868bea98674ae029d21a64e..3fecd25c3248ffd452f47a1ab2c41c31e2e10e47 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -80,8 +80,7 @@
             %legend
               Project avatar:
             .form-group
-              .col-sm-2
-              .col-sm-10
+              .col-sm-offset-2.col-sm-10
                 - if @project.avatar?
                   = project_icon("#{@project.namespace.to_param}/#{@project.to_param}", alt: '', class: 'avatar project-avatar s160')
                 %p.light
diff --git a/app/views/projects/labels/_form.html.haml b/app/views/projects/labels/_form.html.haml
index 261d52dedc1db5193590f0506e0a5b7d956589aa..d791ed3410cf0ba0df76535b66fe3a9677a016a2 100644
--- a/app/views/projects/labels/_form.html.haml
+++ b/app/views/projects/labels/_form.html.haml
@@ -1,7 +1,7 @@
 = form_for [@project.namespace.becomes(Namespace), @project, @label], html: { class: 'form-horizontal label-form' } do |f|
   -if @label.errors.any?
     .row
-      .col-sm-10.col-sm-offset-2
+      .col-sm-offset-2.col-sm-10
         .alert.alert-danger
           - @label.errors.full_messages.each do |msg|
             %span= msg
diff --git a/app/views/projects/merge_requests/show/_how_to_merge.html.haml b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
index 6474d32ac0807c10f9d578288ce259add59942eb..22f601ac99e4f83731f0038e9b2635b6777be050 100644
--- a/app/views/projects/merge_requests/show/_how_to_merge.html.haml
+++ b/app/views/projects/merge_requests/show/_how_to_merge.html.haml
@@ -1,4 +1,4 @@
-%div#modal_merge_info.modal.hide
+%div#modal_merge_info.modal
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml
index 2a8ceaa2844f3ee6a719820c153233aa51189335..904600499aebc21516dcb7a041fae3468bf39697 100644
--- a/app/views/projects/wikis/_form.html.haml
+++ b/app/views/projects/wikis/_form.html.haml
@@ -12,8 +12,7 @@
       = f.select :format, options_for_select(ProjectWiki::MARKUPS, {selected: @page.format}), {}, class: "form-control"
 
   .row
-    .col-sm-2
-    .col-sm-10
+    .col-sm-offset-2.col-sm-10
       %p.cgray
         To link to a (new) page you can just type
         %code [Link Title](page-slug)
diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml
index b2c085f34b18299cb1bb74a531d1ac3b65ccdcc4..dace172438cd6268ccef2a6c13fca80e6f3b28d1 100644
--- a/app/views/projects/wikis/_new.html.haml
+++ b/app/views/projects/wikis/_new.html.haml
@@ -1,4 +1,4 @@
-%div#modal-new-wiki.modal.hide
+%div#modal-new-wiki.modal
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/shared/_clone_panel.html.haml b/app/views/shared/_clone_panel.html.haml
index 3f489a04e7124576ca4a085ec632ad9f0cb8e56d..6de2aed29eda239b9285f4fdec8904811d940a1d 100644
--- a/app/views/shared/_clone_panel.html.haml
+++ b/app/views/shared/_clone_panel.html.haml
@@ -3,6 +3,7 @@
   .input-group-addon.git-protocols
     .input-group-btn
       %button{ |
+        type: 'button', |
         class: "btn btn-sm #{ 'active' if default_clone_protocol == 'ssh' }#{ ' has_tooltip' if current_user && current_user.require_ssh_key? }", |
         :"data-clone" => project.ssh_url_to_repo, |
         :"data-title" => "Add an SSH key to your profile<br> to pull or push via SSH",
@@ -11,6 +12,7 @@
         SSH
     .input-group-btn
       %button{ |
+        type: 'button', |
         class: "btn btn-sm #{ 'active' if default_clone_protocol == 'http' }#{ ' has_tooltip' if current_user && current_user.require_password? }", |
         :"data-clone" => project.http_url_to_repo, |
         :"data-title" => "Set a password on your account<br> to pull or push via #{gitlab_config.protocol.upcase}",
diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml
index 30ba361c860530ffaffdb5df9e274b8c71aafc03..5f51b0d450fddccd0a602d94a4e0c183a6a37cd5 100644
--- a/app/views/shared/_confirm_modal.html.haml
+++ b/app/views/shared/_confirm_modal.html.haml
@@ -1,4 +1,4 @@
-#modal-confirm-danger.modal.hide{tabindex: -1}
+#modal-confirm-danger.modal{tabindex: -1}
   .modal-dialog
     .modal-content
       .modal-header
diff --git a/app/views/shared/snippets/_form.html.haml b/app/views/shared/snippets/_form.html.haml
index 2feeeecc48b1829290b0d61af7b5f2e1e697ed4f..fe25133abb08aea49c0825d25771fc2a3e320e25 100644
--- a/app/views/shared/snippets/_form.html.haml
+++ b/app/views/shared/snippets/_form.html.haml
@@ -12,8 +12,8 @@
 
     = render 'shared/visibility_level', f: f, visibility_level: visibility_level, can_change_visibility_level: true, form_model: @snippet
 
-    .form-group
-      .file-editor
+    .file-editor
+      .form-group
         = f.label :file_name, "File", class: 'control-label'
         .col-sm-10
           .file-holder.snippet