fix: constrain header containers at wide viewports (#47)#52
Merged
Conversation
#logo_container and #chiz_container were both position:fixed; width:25%, anchoring the logo to the far-left and the icons/menu to the far-right of the viewport. At 1150px this created ~575px of dead space; wider screens made it worse. Change the base rule to width:auto; left:25%; right:25% so both containers span the central 50% of the viewport — matching #main_container's padding of 25% 0. Logo gets align-items:flex-start to anchor left within that strip; chiz keeps justify-content:flex-end to anchor right. The narrow-viewport media query (<=1080px) explicitly resets left/right so mobile and tablet behavior is unchanged. No dark-mode rules are affected — only positioning properties changed. Closes #47 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #47. At viewports wider than 1080px,
#logo_containerand#chiz_containerwere bothposition: fixed; width: 25%, anchoring the logo to the far-left edge and the icons/menu to the far-right edge. At 1150px this created ~575px of dead space; wider screens made it worse.Change
CSS-only, no HTML template change.
Base rule (
src/css/styles.css):#logo_container, #chiz_container:width: 25%→width: auto; left: 25%; right: 25%Both containers now span the central 50% of the viewport, matching
#main_container'spadding: 25% 0.#logo_container:align-items: flex-startso the logo anchors to the left edge of that central strip.#chiz_container: removedright: 0(set on base now);justify-content: flex-endalready anchored icons to the right edge.Narrow viewport override (
@media (max-width: 1080px)):#logo_container:left: 0; right: auto— reverts to full-width / left-anchored.#chiz_container:left: auto; right: 0— reverts to right-anchored.Without these explicit overrides, the new base
left: 25%; right: 25%would cascade into mobile/tablet and break them.Why this preserves mobile and tablet
At ≤1080px the narrow-viewport media query resets
left/rightto the originals, so#logo_containergoes back towidth: 100vw; left: 0and#chiz_containergoes back toright: 0with its content-sized width. The ≤800px portrait rules only touchtop, unaffected.Dark mode is unaffected — only positioning properties changed; no color or background rules touched.
Test plan