Skip to content

Advanced Grid Properties: Add missing factors to grid content width calc#30971

Merged
mao-sz merged 2 commits intoTheOdinProject:mainfrom
olgacoz:fix-grid-width-explanation
Apr 6, 2026
Merged

Advanced Grid Properties: Add missing factors to grid content width calc#30971
mao-sz merged 2 commits intoTheOdinProject:mainfrom
olgacoz:fix-grid-width-explanation

Conversation

@olgacoz
Copy link
Copy Markdown
Contributor

@olgacoz olgacoz commented Apr 5, 2026

Because

Text is missing the paddings, and borders of the grid when calculating it's content width. Also it says the browser has to know how wide our grid is but actually means how wide our grid's content width is.

This PR

  • Adds the missing factors into the grid's content width calculation.
  • Uses "grid's content width" wording to avoid misunderstanding.

Issue

Closes #30969

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

@github-actions github-actions bot added the Content: Intermediate HTML/CSS Involves the Intermediate HTML/CSS course label Apr 5, 2026
Co-authored-by: mao-sz <122839503+mao-sz@users.noreply.github.com>
@olgacoz olgacoz closed this Apr 6, 2026
@mao-sz mao-sz reopened this Apr 6, 2026
@mao-sz mao-sz merged commit 2a845f6 into TheOdinProject:main Apr 6, 2026
2 checks passed
@mao-sz
Copy link
Copy Markdown
Contributor

mao-sz commented Apr 6, 2026

You don't need to close anything - a maintainer will do what's needed when a PR is approved.

@olgacoz olgacoz deleted the fix-grid-width-explanation branch April 6, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content: Intermediate HTML/CSS Involves the Intermediate HTML/CSS course

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advanced Grid Properties: Wrong calculation of grid's content width

2 participants