Skip to content

Commit 21e084b

Browse files
Marcel Dütscherclaude
andcommitted
Site: actually center the Get-Started difficulty cards
The previous attempt added `justify-content: center` to .difficulty-grid but the cards stayed pinned to the left of the section. Cause: the shorthand `margin: 20px 0 32px` on the grid set both horizontal margins to 0, silently overriding the `margin-left: auto; margin-right: auto` from the `.section-alt > *` rule that does the section-wide centering. So the grid was 1180 px wide pinned to the section's left content edge instead of being centered, and `justify- content: center` only centered the four cards inside an already-left-aligned grid container. Fix: replace the shorthand with `margin-top: 20px; margin-bottom: 32px` so the inherited auto horizontal margins survive. The other grids on this page (.feature-grid, .parents-grid, .pet-cards) already use only `margin-top` for the same reason — this brings .difficulty-grid in line with that pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1e79978 commit 21e084b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

site/styles.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,13 @@ pre code { background: none; padding: 0; color: inherit; }
594594
as "left-aligned" against the narrower h2/section-lead above. */
595595
grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
596596
gap: 14px;
597-
margin: 20px 0 32px;
597+
/* Keep the auto left/right margins from `.section-alt > *` so the grid
598+
sits centered in the section. The earlier `margin: 20px 0 32px`
599+
shorthand silently zeroed the horizontal margins and pinned the grid
600+
to the left content edge — which is exactly what produced the visible
601+
left-shift the user reported on a wide viewport. */
602+
margin-top: 20px;
603+
margin-bottom: 32px;
598604
justify-content: center;
599605
}
600606
.difficulty-card {

0 commit comments

Comments
 (0)