You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by rb...@apache.org on 2026/09/17 18:17:22 UTC

svn commit: r1938324 - comdev/projects.apache.org/trunk/site

Author: rbowen
Date: Thu Sep 17 18:17:21 2026
New Revision: 1938324

Log:
COMDEV-135: Make navigation bar sticky on scroll

Add position:sticky to #cssmenu so the nav bar stays visible when
scrolling. Also add body::after clearfix since #contents and #footer
are floated, which collapsed the body height and prevented sticky
from working.

Modified:
   comdev/projects.apache.org/trunk/site/styles.css

Modified: comdev/projects.apache.org/trunk/site/styles.css
==============================================================================
--- comdev/projects.apache.org/trunk/site/styles.css	Thu Sep 17 18:14:55 2026	(r1938323)
+++ comdev/projects.apache.org/trunk/site/styles.css	Thu Sep 17 18:17:21 2026	(r1938324)
@@ -30,6 +30,10 @@
   width: auto;
   height: 59px;
   padding-bottom: 4px;
+  position: sticky;
+  top: 0;
+  z-index: 100;
+  background: #222;
 }
 #cssmenu.align-right {
   float: right;
@@ -124,6 +128,14 @@ body {
         font: 15px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
         background-color: #fff;
     }
+
+/* Clearfix: force body to contain floated children (#contents, #footer)
+   so that position:sticky works on #cssmenu */
+body::after {
+    content: "";
+    display: block;
+    clear: both;
+}
     
 .leftbar {
   width: 275px;