topskill.dev
CoursesTracks
0
All courses/CSSFluid weather bulletin
Responsive Design
4 / 6
← CSS
○CSS Rule Style an Exhibit Card○Write Your First CSS Rule○CSS Selectors Target Exhibit Details○Target Exhibit Details○Apply CSS Three Sources○Apply CSS Three Ways○Specificity Resolve a Style Conflict○Resolve Specificity○Inheritance and the cascade✦Module Quiz
○Color Palette○Color Palette○Background Layer○Background Layer○Type Rhythm○Type Rhythm○Borders and Shadows○Borders and Shadows✦Module Quiz
○Box Model Seed Packet Card○Space a Seed Packet○Display Swap Table Labels○Arrange Swap Table Labels○Positioning Pickup Pin○Pin the Pickup Location○Sizing and Overflow○Size a Seed-Swap Notice○Sticky scroll headings✦Module Quiz
○Advanced Selectors Book Cart Sign○Target a Book Cart Sign○Pseudo-Classes Night Cart States○Style Night Cart States○Pseudo-Elements○Add a Book-Quote Mark✦Module Quiz
○Lantern Market navigation○Lantern Market navigation✦Module Quiz
○Community garden request card○Community garden request card✦Module Quiz
○Flex Direction○Flex Direction○Main-Axis Spacing○Main-Axis Spacing○Cross-Axis Alignment○Cross-Axis Alignment○Wrapping and Flex Items○Wrapping and Flex Items○Flexbox Navigation○Flexbox Navigation✦Module Quiz
○Grid Tracks○Grid Tracks○Grid Gaps○Grid Gaps○Grid Placement○Grid Placement○Responsive Grid○Responsive Grid✦Module Quiz
○River radio schedule○Harbor radio schedule✦Module Quiz
○Field note color system○Field note color system○Transforms○Rotate a Field Note○Resilient styles✦Module Quiz
○Kite festival signal○Garden festival signal✦Module Quiz
○Garden forecast○Harbor forecast○Fluid sizing●Fluid weather bulletin○Images that fit✦Module Quiz
○Seed inventory table○Tool checkout table✦Module Quiz
○Community maker profile○Maker profile sheet✦Module Quiz

Fluid weather bulletin

The morning and afternoon forecast cards already have a basic grid and colors, but still need fluid sizing. Use the preceding park forecast to guide three independent CSS rules. Work in style.css; the supplied markup needs no edits.

min() picks the smaller width, minmax() gives a grid column a minimum and a flexible maximum, and clamp() keeps padding between two bounds. Add the rules in this order and preview after each one.

Your Task

  1. Set .page-shell width to min(92%, 48rem) so the page has breathing room but stops growing beyond 48rem.
  2. Set .bulletin grid-template-columns to repeat(auto-fit, minmax(14rem, 1fr)) so cards can stack or share a row as space permits.
  3. Set .card padding to clamp(1rem, 3vw, 2rem) so it grows within those bounds.

This starts a fresh bulletin rather than continuing the preceding 42rem media-query answer. Its CSS intentionally has no breakpoint: available container space determines the columns. The 14rem minimum still needs enough room for one column; check ordinary phone widths rather than assuming it can shrink indefinitely.

Checkpoint: Resize the preview iframe to about 400px, then 800px. The page width and card padding change gradually; the cards fit side by side only when there is room. Next, you will use the same available-space thinking to keep a table usable on a phone.

Files
  • ⋄index.html
  • ⋄style.css
Loading editor…