Commit 8d735ab
index2.html: stop fixed navbar from overlapping hero on mobile
On narrow screens the fixed top header switches to a stacked column
layout and the nav links wrap to several rows, so the header grows to
~170px tall — well past the hero's fixed 6rem top padding. With the hero
content vertically centered, the logo and title ended up hidden behind
the navbar (reported in discussion #9768).
Offset the hero's top padding by the measured header height
(--header-h, already set in JS) via max(6rem, --header-h + 1.5rem), so
the content always clears the header. Desktop is unaffected: the header
is shorter than 6rem there, so the 6rem value still wins.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5ee395b commit 8d735ab
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
0 commit comments