Problem: Fullscreen Section with Max Width Content

med
30 min
Try to center content in a fullscreen section with a maximum width limit.

Problem description

Given an HTML file with a <section class="fullscreen-section"><div class="content"></div></section>, write CSS so the section is always fullscreen, content is centered, and .content never exceeds 600px in width (but is still centered).

Goal

Create a fullscreen section with content centered and a defined max width for content.

Constraints

  • Do not use JavaScript.

  • Use CSS only.

  • Do not change the HTML structure.

Sample visual output

Here’s what the output would look like:

Good luck trying the problem! If you’re unsure how to proceed, check the Solution.

Problem: Fullscreen Section with Max Width Content

med
30 min
Try to center content in a fullscreen section with a maximum width limit.

Problem description

Given an HTML file with a <section class="fullscreen-section"><div class="content"></div></section>, write CSS so the section is always fullscreen, content is centered, and .content never exceeds 600px in width (but is still centered).

Goal

Create a fullscreen section with content centered and a defined max width for content.

Constraints

  • Do not use JavaScript.

  • Use CSS only.

  • Do not change the HTML structure.

Sample visual output

Here’s what the output would look like:

Good luck trying the problem! If you’re unsure how to proceed, check the Solution.