diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss
index 8d3d1a72b9b24e2ea2a25c9557ca102849f00624..cf8735e6fad2d26c3177b3bd61a6a664c786592b 100644
--- a/app/assets/stylesheets/pages/issuable.scss
+++ b/app/assets/stylesheets/pages/issuable.scss
@@ -6,7 +6,13 @@
 }
 
 .limit-container-width {
-  .detail-page-header {
+  .detail-page-header,
+  .page-content-header,
+  .commit-box,
+  .info-well,
+  .notes,
+  .commit-ci-menu,
+  .files-changed {
     @extend .fixed-width-container;
   }
 
@@ -36,8 +42,7 @@
   }
 
   .diffs {
-    .mr-version-controls,
-    .files-changed {
+    .mr-version-controls {
       @extend .fixed-width-container;
     }
   }
diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml
index 0d11da2451a573860518d12179c5751cc00239d5..cdf0f11dc5fb3b2c6126b27521f29bb3b22b4278 100644
--- a/app/views/projects/commit/show.html.haml
+++ b/app/views/projects/commit/show.html.haml
@@ -1,9 +1,11 @@
 - @no_container = true
+- container_class = !fluid_layout && diff_view == :inline ? 'container-limited' : ''
+- limited_container_width = fluid_layout || diff_view == :inline ? '' : 'limit-container-width'
 - page_title        "#{@commit.title} (#{@commit.short_id})", "Commits"
 - page_description  @commit.description
 = render "projects/commits/head"
 
-%div{ class: container_class }
+%div.container-fluid{ class: [limited_container_width, container_class] }
   = render "commit_box"
   - if @commit.status
     = render "ci_menu"
diff --git a/changelogs/unreleased/commit-limited-container-width.yml b/changelogs/unreleased/commit-limited-container-width.yml
new file mode 100644
index 0000000000000000000000000000000000000000..253646b13da8bad645717dd86b4436d9f19b7240
--- /dev/null
+++ b/changelogs/unreleased/commit-limited-container-width.yml
@@ -0,0 +1,4 @@
+---
+title: Side-by-side view in commits correcly expands full window width
+merge_request:
+author:
diff --git a/spec/features/projects/commit/container_spec.rb b/spec/features/projects/commit/container_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..80b758ec14f00a4d85edd6bc3b0aa2f5c00bfc12
--- /dev/null
+++ b/spec/features/projects/commit/container_spec.rb
@@ -0,0 +1,23 @@
+require 'spec_helper'
+
+describe 'Commit container', :js, :feature do
+  let(:user) { create(:user) }
+  let(:project) { create(:project) }
+
+  before do
+    project.team << [user, :master]
+    login_as(user)
+  end
+
+  it 'keeps container-limited when view type is inline' do
+    visit namespace_project_commit_path(project.namespace, project, project.commit.id, view: :inline)
+
+    expect(page).not_to have_selector('.limit-container-width')
+  end
+
+  it 'diff spans full width when view type is parallel' do
+    visit namespace_project_commit_path(project.namespace, project, project.commit.id, view: :parallel)
+
+    expect(page).to have_selector('.limit-container-width')
+  end
+end