Problem: Blog Sidebar Visibility
Problem description
Given an HTML page with two main sections:
<aside class="sidebar">contains a list of recent posts, categories, and links.<main class="content">contains the primary blog post content.
Write CSS to meet the following requirements:
The
.sidebarshould be visible when the viewport width is1200pxor wider and hidden when the viewport width is less than1200px.The
.contentsection should always be visible and take full width when the sidebar is hidden.
Goal
Improve readability on smaller devices by hiding the sidebar, while displaying it on larger screens to support easier navigation and supplemental content.
Constraints
Only use CSS; JavaScript or HTML changes are not allowed.
Use exactly
1200pxas the breakpoint.
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: Blog Sidebar Visibility
Problem description
Given an HTML page with two main sections:
<aside class="sidebar">contains a list of recent posts, categories, and links.<main class="content">contains the primary blog post content.
Write CSS to meet the following requirements:
The
.sidebarshould be visible when the viewport width is1200pxor wider and hidden when the viewport width is less than1200px.The
.contentsection should always be visible and take full width when the sidebar is hidden.
Goal
Improve readability on smaller devices by hiding the sidebar, while displaying it on larger screens to support easier navigation and supplemental content.
Constraints
Only use CSS; JavaScript or HTML changes are not allowed.
Use exactly
1200pxas the breakpoint.
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.