[PATCH 2/5] css: contain horizontal page overflow to content blocks

Rito Rhymes rito at ritovision.com
Wed Feb 25 23:07:26 UTC 2026


Wide tables and long preformatted lines can force page-wide horizontal
scrolling on mobile, which breaks the layout.

Allow contained horizontal overflow on the main content area and
preformatted blocks so scrolling stays localized to those elements
instead of the entire page.

Signed-off-by: Rito Rhymes <rito at ritovision.com>
---
 cgit.css | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/cgit.css b/cgit.css
index 1b848cf..cf23c39 100644
--- a/cgit.css
+++ b/cgit.css
@@ -117,6 +117,13 @@ div#cgit div.content {
 	margin: 0px;
 	padding: 2em;
 	border-bottom: solid 3px #ccc;
+	overflow-x: auto;
+	-webkit-overflow-scrolling: touch;
+}
+
+div#cgit pre {
+	overflow-x: auto;
+	-webkit-overflow-scrolling: touch;
 }
 
 
-- 
2.51.0



More information about the CGit mailing list