UNIT 10 • STAGE 7 OF 7
Make the grid adapt to any screen size, then complete the page with a footer
A media query is a CSS rule that only applies when the browser viewport meets a condition. The most common condition is maximum width: the styles inside only take effect when the screen is at or below a certain pixel size.
Media queries go at the bottom of your stylesheet, after all other rules. When the browser viewport is wider than 900px, the three-column grid applies. When it narrows to 900px or below, the two-column rule kicks in and overrides it.
This is your first look at media queries. The concept is the same across all projects: write your default styles first, then use @media to adjust them for smaller screens.
Grid changes at each breakpoint:
Add these two media query blocks just above </style>. Media queries always go at the end of your CSS so they can override earlier rules:
To test the breakpoints, narrow the Live Preview panel by dragging the divider to the left. Watch the grid reflow from three columns to two, then from two to one.
Add these two footer rules after the media queries, still inside <style>:
Add the footer element just before </body>, after the modal overlay HTML:
· is an HTML entity that renders as a centered dot ( · ), a common separator in footers and metadata lines. You have seen this pattern throughout this unit in the modal nation labels.
@media (max-width: 900px), the styles inside this block only apply when the viewport is 900 pixels wide or less. On wider screens the rule is completely ignored. Media queries go at the end of the stylesheet so they can override earlier declarations without needing to increase specificity.repeat(2, 1fr) at 900px, switching from three equal columns to two gives each card more width on a tablet. The cards were getting narrow enough to crowd the dancer images at three columns.1fr at 600px, a single column that fills the full available width is the most readable layout on a phone. Six cards stack vertically, each taking the full row.80px 40px side padding eats significantly into the content area on a narrow phone screen. Reducing to 60px 24px recovers that space without losing the visual breathing room.font-size: 2rem for #hero h1 at 600px, 3rem at that size would push the heading onto multiple lines more than necessary and feel oversized for the viewport.background: #0a0a0f on the footer, slightly darker than the #0f0f1a dancers section, creating a gentle visual step down that signals the end of the page.color: rgba(255, 255, 255, 0.45), muted footer text that stays readable without competing with the main content. Attribution and source links should be present but quiet.You have built a complete, interactive powwow website from a blank page. Hover effects with CSS transitions, illustrated PNG images grounded with object-position, a data-driven modal opened with JavaScript, responsive layout using media queries, and a sourced footer. Every piece connects to a real technique used in production web work.
The content in this unit represents living Tribal traditions. The Jingle Dress dance, the Grass Dance, Men's Traditional, and all of the styles you built cards for are still practiced and celebrated at powwows today across Lakota, Dakota, and Ojibwe communities.