diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 79a0dc1b9591d30bc18349739c29f299e871cec4..0fd19780570a24132fb875ca1c59451e7447d235 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -1,6 +1,6 @@
 - empty_repo = @project.empty_repo?
 .project-home-panel.text-center{ class: ("empty-project" if empty_repo) }
-  %div{ class: container_class }
+  .limit-container-width{ class: container_class }
     .avatar-container.s70.project-avatar
       = project_icon(@project, alt: @project.name, class: 'avatar s70 avatar-tile')
     %h1.project-title
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index de1229d58aaefcdcf8bc84ec6d20716a9b054e5f..edfe6da1816406795de1126cbaecab2596c876ae 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -13,7 +13,7 @@
 = render "home_panel"
 
 - if current_user && can?(current_user, :download_code, @project)
-  %nav.project-stats{ class: container_class }
+  %nav.project-stats.limit-container-width{ class: container_class }
     %ul.nav
       %li
         = link_to project_files_path(@project) do
@@ -74,11 +74,11 @@
               Set up auto deploy
 
   - if @repository.commit
-    %div{ class: container_class }
+    .limit-container-width{ class: container_class }
       .project-last-commit
         = render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project
 
-%div{ class: container_class }
+.limit-container-width{ class: container_class }
   - if @project.archived?
     .text-warning.center.prepend-top-20
       %p
diff --git a/changelogs/unreleased/20914-project-home-width.yml b/changelogs/unreleased/20914-project-home-width.yml
new file mode 100644
index 0000000000000000000000000000000000000000..323a614f3c8d528f1ce19893bac5e9525e2714f9
--- /dev/null
+++ b/changelogs/unreleased/20914-project-home-width.yml
@@ -0,0 +1,4 @@
+---
+title: Limit line length for project home page
+merge_request:
+author: