Sick new hero design punches way above its weight!
๐ **Source:** [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
> [!note]+ Document Notes
> tags: [css-grid, flexbox, web-design, responsive-design]
> author: [MISSING]
> source: YouTube
> reference: https://www.youtube.com/watch?v=eKIiUaHnvlQ
> date created: 2024-12-19 14:30
>
> # ๐ท๏ธ Title: Sick new hero design punches way above its weight!
>
<!-- deep-read:sections start -->
## ๐งฐ Action Inbox
- [H1] Create 2x2 CSS grid with uneven rows for hero layout โ 00:00-02:30 #css-grid
- [H2] Use grid positioning to achieve overlapping elements โ 05:23-08:45 #layout
- [H3] Implement responsive breakpoints with media queries โ 15:30-22:00 #responsive
## ๐งญ Table of Contents
- [๐ Summary](#-summary)
- [๐ Main Content](#-main-content)
- [๐๏ธ Notes](#๏ธ-notes)
- [๐ References](#-references)
- [๐ฃ๏ธ Paraphrase](#๏ธ-paraphrase)
- [๐ฐ Newsletter](#-newsletter)
- [โ
Action Items](#-action-items)
- [๐งช Hypotheses](#-hypotheses)
- [๐ Methodology](#-methodology)
- [โ Questions](#-questions)
- [๐ฎ Future Research](#-future-research)
- [๐ก Implications](#-implications)
- [๐ง Learning Styles Assessment](#-learning-styles-assessment)
- [๐ Accessibility Assessment](#-accessibility-assessment)
- [๐ DEIB Assessment](#-deib-assessment)
- [โ
Logical Validity](#-logical-validity)
- [๐ก๏ธ DARVO Analysis](#-darvo-analysis)
- [๐ฏ Conclusion](#-conclusion)
### ๐ References
- [Video Source](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
## ๐ Summary
- Tutorial demonstrates building a complex hero layout with overlapping elements using CSS Grid
- Combines CSS Grid for positioning with Flexbox for component alignment
- Covers responsive design implementation with multiple breakpoints
- Uses GenerateBlocks WordPress page builder for practical implementation
- Shows how grid positioning allows precise control over overlapping content
## ๐ Main Content
The video teaches how to create a sophisticated hero section layout that features overlapping elements using CSS Grid. The design includes main content, a large image, and stat cards that overlap the image in an aesthetically pleasing way. The instructor explains the grid system conceptually before implementing it practically, showing how to use grid line numbers for precise positioning. The tutorial also covers making the layout fully responsive using media queries and combining CSS Grid with Flexbox where appropriate.
## ๐๏ธ Notes
#### โฑ๏ธ [00:00](https://youtu.be/eKIiUaHnvlQ?t=0) โ [H1] Project overview and grid planning
- Key idea: Complex overlapping layouts can be simplified using CSS Grid
- Evidence: "A layout like this really lends itself to using CSS grid"
#### โฑ๏ธ [02:30](https://youtu.be/eKIiUaHnvlQ?t=150) โ [H2] Grid structure breakdown
- Key idea: 2x2 grid with uneven row heights handles the layout
- Evidence: "What we have here is essentially a 2x2 grid. We have two columns running on the left and right and then two rows"
#### โฑ๏ธ [04:15](https://youtu.be/eKIiUaHnvlQ?t=255) โ [H3] Grid positioning strategy
- Key idea: Grid line numbers control precise element placement
- Evidence: "Our image needs to span from column 2 to column 3... from row one and go all the way down to row three"
#### โฑ๏ธ [06:30](https://youtu.be/eKIiUaHnvlQ?t=390) โ [H1] Building the HTML structure
- Key idea: Three main containers handle content, image, and overlapping elements
- Evidence: "We're going to need three boxes... main content... image wrapper... CTA plus stat cards"
#### โฑ๏ธ [09:45](https://youtu.be/eKIiUaHnvlQ?t=585) โ [H2] Styling stat cards component
- Key idea: Flexbox handles internal card layout and spacing
- Evidence: "Change this to a display of flex so I can get these items next to each other"
#### โฑ๏ธ [12:20](https://youtu.be/eKIiUaHnvlQ?t=740) โ [H3] Implementing CSS Grid layout
- Key idea: Grid template creates the foundation for positioning
- Evidence: "We're going to change this to a display of grid... use our little helper here for the two column grid"
#### โฑ๏ธ [13:45](https://youtu.be/eKIiUaHnvlQ?t=825) โ [H1] Grid positioning implementation
- Key idea: Explicit grid positioning creates overlapping effects
- Evidence: "Image wrapper... grid column 2 to three... rows 1 to 3... stat cards... column 1 to three... rows 2 to 3"
#### โฑ๏ธ [15:30](https://youtu.be/eKIiUaHnvlQ?t=930) โ [H2] Adding spacing and padding
- Key idea: Padding controls element spacing without affecting grid alignment
- Evidence: "120 of right just to push it away from that image... 24 from the right and 24 from the bottom"
#### โฑ๏ธ [17:00](https://youtu.be/eKIiUaHnvlQ?t=1020) โ [H3] First responsive breakpoint
- Key idea: 1130px breakpoint prevents collision between elements
- Evidence: "We can see it actually collides around the 1100 mark... set our media query maybe here around 11:30"
#### โฑ๏ธ [18:45](https://youtu.be/eKIiUaHnvlQ?t=1125) โ [H1] Stacking elements at medium screens
- Key idea: Flex direction column-reverse reorders content appropriately
- Evidence: "Change this flex direction to column... column reverse... button should go below these stack cards"
#### โฑ๏ธ [20:30](https://youtu.be/eKIiUaHnvlQ?t=1230) โ [H2] Single column grid at 1000px
- Key idea: Grid changes to single column with explicit row positioning
- Evidence: "Change this to a one column grid... main content 1 over 2... image wrapper 2 over 3... stack cards 3 over 4"
#### โฑ๏ธ [22:15](https://youtu.be/eKIiUaHnvlQ?t=1335) โ [H3] Card wrapping at 820px breakpoint
- Key idea: Flex wrap prevents text breaking to multiple lines
- Evidence: "Allow all these cards to wrap... flex wrap and choose wrap... change this down to maybe two rim"
#### โฑ๏ธ [23:30](https://youtu.be/eKIiUaHnvlQ?t=1410) โ [H1] Final mobile adjustments
- Key idea: Square aspect ratio improves image prominence on mobile
- Evidence: "Change an aspect ratio... one over one just so the image is a big square"
#### โฑ๏ธ [24:45](https://youtu.be/eKIiUaHnvlQ?t=1485) โ [H2] Grid vs Flexbox philosophy
- Key idea: Both CSS Grid and Flexbox have specific strengths for different use cases
- Evidence: "They both have their strengths and weaknesses... CSS grid made it really nice to overlap things... stack cards work better when using flexbox"
## ๐ References
- [CSS Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout)
- [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout)
- [GenerateBlocks](https://generateblocks.com/)
## ๐ฃ๏ธ Paraphrase
- Complex overlapping layouts become manageable when broken down into a simple 2x2 CSS Grid structure
- Grid line positioning allows precise control over how elements span columns and rows to create overlaps
- Responsive design requires multiple breakpoints with different layout strategies for each screen size
- Combining CSS Grid for positioning with Flexbox for alignment provides the most flexible solution
## ๐ฐ Newsletter
This week's design spotlight showcases an elegant solution for complex hero layouts using CSS Grid! The tutorial demonstrates how a seemingly complicated overlapping design breaks down into a simple 2x2 grid structure, making it accessible for WordPress developers at any skill level.
Key takeaways include using grid line numbers for precise positioning, implementing responsive breakpoints that prevent element collisions, and knowing when to combine CSS Grid with Flexbox for optimal results. The practical GenerateBlocks implementation makes this immediately applicable to client projects.
Resources: [CSS Grid Guide](https://css-tricks.com/snippets/css/complete-guide-grid/), [Flexbox Guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/), [GenerateBlocks Documentation](https://docs.generateblocks.com/)
## โ
Action Items
#### WordPress
- Core: Evaluate grid layout support in block editor themes
- Themes: Review theme grid implementation patterns and responsive strategies
- Design: Create grid layout component library for block themes
#### Community
- Contributors: Document CSS Grid best practices for WordPress themes
- Maintainers: Establish grid layout standards for block patterns
## ๐งช Hypotheses
- CSS Grid adoption increases when developers see practical overlapping layout examples
- Combining Grid and Flexbox reduces development time compared to using either alone
- Multiple responsive breakpoints prevent layout collisions better than single breakpoints
- Visual grid planning improves implementation accuracy and reduces debugging time
### ๐ Methodology
- A/B test grid vs flexbox-only implementations measuring development time
- User testing on responsive breakpoint effectiveness across devices
- Survey developers on CSS Grid confidence before/after practical tutorials
### โ Questions
- How does CSS Grid browser support impact adoption in WordPress themes?
- What's the optimal number of responsive breakpoints for complex layouts?
- How can WordPress block patterns better leverage CSS Grid capabilities?
### ๐ฎ Future Research
- CSS Subgrid implementation patterns for WordPress themes
- Container query integration with CSS Grid for component-level responsiveness
- Performance impact of complex grid layouts on WordPress sites
### ๐ก Implications
- Practice: Developers can create more sophisticated layouts without complex positioning hacks
- Education: Visual grid planning should precede code implementation in training materials
- Funding: Advanced CSS features require ongoing education budget allocation
### ๐ง Learning Styles Assessment
Reading level estimate: 8.5 (Flesch-Kincaid Grade Level)
#### ๐ Visual learners
- Present: Grid overlay diagrams, numbered grid lines, visual breakdowns
- Improve: Interactive grid visualizer, color-coded grid areas
#### ๐ Aural learners
- Present: Step-by-step verbal explanations, reasoning for each decision
- Improve: Audio-only version focusing on CSS concepts
#### ๐ฃ๏ธ Verbal learners
- Present: Clear terminology definitions, analogies to physical layouts
- Improve: Glossary of grid terms, comparison table Grid vs Flexbox
#### ๐งฉ Kinesthetic learners
- Present: Hands-on building exercise, live code demonstration
- Improve: Downloadable starter files, practice exercises with variations
#### ๐ง Logical learners
- Present: Grid line numbering system, systematic breakpoint approach
- Improve: Decision tree for grid vs flexbox choice, responsive strategy flowchart
#### ๐งโ๐คโ๐ง Social learners
- Present: Comments section engagement, shared project showcase
- Improve: Community challenges, peer code review sessions
#### ๐งโโ๏ธ Solitary learners
- Present: Complete tutorial that can be followed independently
- Improve: Self-assessment checklist, troubleshooting guide
#### ๐ฟ Naturalistic learners
- Present: Organic layout evolution through breakpoints
- Improve: Layout ecosystem metaphors, natural spacing relationships
### ๐ Accessibility Assessment
#### Screen reader semantics
- Present: Clear heading structure, descriptive element names
- Improve: ARIA labels for grid regions, landmark roles
#### Keyboard navigation
- Present: Standard tab order through interactive elements
- Improve: Focus management in overlapping content areas
#### Contrast and readability
- Present: High contrast code examples, clear visual hierarchy
- Improve: Dark mode code examples, larger font options
#### Text resizing and reflow
- Present: Responsive design accommodates text scaling
- Improve: Test layout at 200% zoom explicitly
#### Media and captions
- Present: Video tutorial with clear visual demonstrations
- Improve: Closed captions, transcript with timestamps
#### Forms and interactions
- Present: Clear button styling and hover states
- Improve: Focus indicators for all interactive elements
### ๐ DEIB Assessment
#### Cultural breadth
- Present: Generic "Richmond" location example
- Improve: Multiple city examples from different regions
#### Inclusive language
- Present: Technical terms clearly explained, neutral tone
- Improve: Avoid idioms like "punches above its weight"
#### Neurodiversity support
- Present: Step-by-step structure, clear progression
- Improve: Section summaries, progress indicators
#### Representation
- Present: Focuses on technical implementation
- Improve: Include diverse use cases beyond tourism sites
#### Psychological safety
- Present: Encouraging tone, acknowledges learning curve
- Improve: Explicit "no stupid questions" messaging
### โ
Logical Validity
#### Strong reasoning
- Deductive strength: Grid system principles correctly applied to specific layout
- Inductive strength: Responsive patterns generalized from specific breakpoint issues
- Causal reasoning: Clear cause-effect between grid positioning and overlapping results
- Analogical strength: Grid lines compared to physical layout constraints
#### Fallacies
- Appeal to popularity: "Grid videos have been really well-received" - popularity doesn't prove effectiveness
- False dilemma: Grid vs Flexbox framed as either/or when combination is often best
#### Tone of voice
- Overall tone: Educational and encouraging, demonstrates concepts clearly with practical examples
### ๐ก๏ธ DARVO Analysis
- Deny: No concerning content identified
- Attack: No attacking behavior present
- Reverse victim/offender: No relevant dynamics present
- Emotional cues and rhetoric: Positive, educational tone throughout
## ๐ฏ Conclusion
This tutorial effectively demonstrates that complex overlapping layouts become manageable when approached systematically through CSS Grid. The combination of visual planning, practical implementation, and responsive considerations provides a complete framework for building sophisticated hero sections. The key insight is that understanding both CSS Grid and Flexbox strengths allows developers to choose the right tool for each specific layout challenge, resulting in cleaner, more maintainable code.
## ๐งฑ Refactor Appendix
### ๐ Literature Split Pad
### [H1] CSS Grid enables complex overlapping layouts
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ) by an unnamed author via [[YouTube]]. Published [MISSING]. Accessed 2024-12-19.
> "A layout like this really lends itself to using CSS grid"
Demonstrates practical application of grid for overlapping hero elements.
[view highlight](https://youtu.be/eKIiUaHnvlQ?t=0#H1) #xref #articleseed ID:rw_001
### [H2] Grid line positioning provides precise control
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
> "Our image needs to span from column 2 to column 3 and from row one to row three"
Shows how numbered grid lines enable exact element placement.
[view highlight](https://youtu.be/eKIiUaHnvlQ?t=255#H2) #xref ID:rw_002
### [H3] Responsive breakpoints prevent layout collisions
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
> "We can see it collides around the 1100 mark, so we'll set our media query at 11:30"
Strategic breakpoint selection maintains layout integrity across devices.
[view highlight](https://youtu.be/
---
## Full Transcript
[00:00] I just started designing a new project<br>[00:02] for a client, and when I came up with<br>[00:03] this hero layout, I was really excited<br>[00:05] about how it turned out, but a little<br>[00:07] bit worried about exactly how I would<br>[00:09] build it. There's some overlapping<br>[00:11] pieces here and some interesting things<br>[00:13] that I don't see in every single<br>[00:14] project. A layout like this really lends<br>[00:17] itself to using CSS grid, and in the<br>[00:19] last few grid videos I've done, they've<br>[00:21] been really wellreceived. So, I thought<br>[00:22] we'd break this layout down today to<br>[00:24] talk about how we can make this into its<br>[00:26] most simplistic form, lay out this grid,<br>[00:29] and then figure out how to place<br>[00:30] everything inside the cells we need to<br>[00:32] to get that cool overlapping effect. I<br>[00:35] think it's a pretty neat little trick,<br>[00:36] and you'll learn a few things along the<br>[00:37] way. So, if that sounds interesting to<br>[00:39] you, then stick around and let's get<br>[00:40] started. So, we'll just kind of ignore<br>[00:42] the header for now. We're not going to<br>[00:43] worry about that in this demo. What<br>[00:45] we're really focused on is this hero<br>[00:46] section. So you can see we have this<br>[00:49] main content over here on the left.<br>[00:51] Underneath it we have a CTA, this<br>[00:53] explore Richmond button and a row of<br>[00:56] stat cards that kind of overlap the<br>[00:58] image that's over on the right hand<br>[01:00] side. So if we overlay a possible grid<br>[01:03] on top of this, what we have here is<br>[01:05] essentially a 2x two grid. We have two<br>[01:08] columns running on the left and right<br>[01:10] and then two rows, one on the top and<br>[01:12] one on the bottom. Now the columns are<br>[01:14] even. They're just split 50/50 right<br>[01:16] down the middle of the screen, but the<br>[01:18] rows are actually different heights.<br>[01:19] This top row is quite a bit bigger than<br>[01:21] the bottom row, even though this bottom<br>[01:23] row has quite a bit of padding in<br>[01:24] between the cards and the top and bottom<br>[01:27] of its constraints. So, if we look at<br>[01:29] each individual piece here, we have this<br>[01:32] main content that kind of goes in the<br>[01:33] top left. It doesn't overlap anything.<br>[01:35] So, we can put it in the first column<br>[01:38] and the first row. Now, the image goes<br>[01:40] next to it. It doesn't overlap columns<br>[01:43] here, but it does overlap rows. The<br>[01:45] image is going to span from the<br>[01:46] beginning to the end of the second<br>[01:48] column. And it's going to span all the<br>[01:50] way from the top of the first row to the<br>[01:52] bottom of the second row. And then we<br>[01:55] bring in the stack cards, which are<br>[01:56] going to span the entire width. So from<br>[01:58] the start of the first column to the end<br>[02:00] of the first column, but it's only going<br>[02:02] to span one row, which is the second row<br>[02:04] in here. So we want it to start at that<br>[02:05] second row line and finish at the third.<br>[02:08] This way we can get our image and stack<br>[02:10] cards to overlap just the way we want<br>[02:12] it. If we go back to our drawing here,<br>[02:14] we have our columns and our rows. The<br>[02:16] columns are numbered starting with one<br>[02:18] all the way on the left hand side. The<br>[02:21] next one is two and then the end of this<br>[02:23] second column is three. So it can be a<br>[02:25] little bit confusing when you're dealing<br>[02:26] with column two to say to go to three,<br>[02:29] but we're counting the start of each one<br>[02:31] of these lines. The same thing happens<br>[02:33] with the rows, but here we start at the<br>[02:35] top and then work our way down. So since<br>[02:37] we have two rows, we have these grid<br>[02:39] lines 1 2 and three. So in order to<br>[02:42] place this content, we need to think<br>[02:44] about what grid cells everything needs<br>[02:45] to live in. Our main content here can go<br>[02:48] from 1 to two and from one to two on the<br>[02:51] rows, which is what it's going to do by<br>[02:53] default. Our image, however, needs to<br>[02:55] span from column 2 to column 3. So it<br>[02:58] starts on this second column here and<br>[03:00] goes all the way to the end. And then<br>[03:02] for the rows, it needs to start at row<br>[03:04] one and go all the way down to row three<br>[03:07] so that it can expand to the bottom of<br>[03:08] our grid. And finally, this CTA row,<br>[03:12] it's going to start at row two and go to<br>[03:14] row three. And it's also going to start<br>[03:16] from column one and go over to column 3.<br>[03:19] Of course, this is just a lot of talk<br>[03:21] about theory, but I wanted to set this<br>[03:22] up so you could see what I was doing<br>[03:24] once I got into the builder. And<br>[03:26] hopefully then it will all start to<br>[03:27] click. So, let's go ahead and jump<br>[03:29] inside generate blocks now and start to<br>[03:30] build some of this out. Now, I don't<br>[03:32] have any kind of framework installed<br>[03:34] here, but I do have a few little helpers<br>[03:36] like my little section reusable block<br>[03:38] that we'll reuse throughout this. We<br>[03:40] have a button class as well, but for the<br>[03:42] most part, I'm going to be doing all of<br>[03:43] this from scratch. So, we have our<br>[03:45] section with our inner wrapper. Of<br>[03:46] course, the inner wrapper is just<br>[03:48] constraining our content width. And<br>[03:50] inside of it, essentially, we're going<br>[03:51] to need three boxes. This first one<br>[03:53] here, we'll go ahead and rename. This is<br>[03:55] going to be our main content. I'm just<br>[03:56] going to label these the same as I did<br>[03:58] inside of Figma. This is going to be our<br>[04:00] image wrapper. And then here at this<br>[04:03] last container, we'll rename that.<br>[04:05] That's going to be our CTA plus our stat<br>[04:07] cards.<br>[04:10] Now, inside of this main content, we<br>[04:12] know that we're going to need a<br>[04:13] headline, which is just going to say<br>[04:15] choose a city that lets you breathe. I'm<br>[04:17] going to go ahead and change this to an<br>[04:18] H1. We also had a little highlight on<br>[04:20] the word breathe here, so I'm going to<br>[04:22] go ahead and do that. Of course, this<br>[04:23] isn't a full site, so I should be<br>[04:25] putting classes on all these things. But<br>[04:27] for the point of demo, I'm just going to<br>[04:28] do this on the default generate blocks<br>[04:30] classes since this isn't going to expand<br>[04:32] to anything bigger in this site. Now,<br>[04:34] under that, we're going to need a text<br>[04:36] block. And I'll just paste in the text<br>[04:38] from our Figma drawing. I want to make<br>[04:40] sure to go ahead and get rid of the<br>[04:41] bottom margin that comes on those<br>[04:43] paragraphs. So, we can go ahead and snug<br>[04:45] things up there. Now, next, inside this<br>[04:47] image wrapper, I want to go ahead and<br>[04:49] put an image. We'll grab the image I<br>[04:51] already have in my media library. I do<br>[04:53] want to make sure to change the display<br>[04:55] of that to block. If not, there's a<br>[04:56] little bit of margin at the bottom of<br>[04:58] this that kind of gets in the way. And<br>[05:00] then I just want to make sure to set the<br>[05:02] width and height both to 100%. Because<br>[05:05] I'm going to want this to always fill up<br>[05:06] that container.<br>[05:08] And then inside of our stack cards,<br>[05:10] we're going to have two containers in<br>[05:11] here as well. The first one is going to<br>[05:13] be our button wrapper. So I'll just go<br>[05:15] ahead and put a button in here. Now, you<br>[05:17] don't necessarily need to put this<br>[05:18] button inside of a container. It could<br>[05:20] just be directly inside the stack cards<br>[05:22] wrapper, but just in case I ever want to<br>[05:24] put something else in here, I have that<br>[05:25] option and it's not really hurting<br>[05:27] anything. So, in here, this is going to<br>[05:29] say explore Richmond, Virginia. And like<br>[05:32] I said, I already have a class set up<br>[05:34] for my buttons here. So, I'm just going<br>[05:36] to go ahead and add that so we don't<br>[05:37] have to style that button completely<br>[05:38] from scratch.<br>[05:40] Now, inside this wrapper, this is what's<br>[05:42] going to hold all my stat cards. I'm<br>[05:44] going to have my individual stat card<br>[05:46] here. I'll go ahead and rename this stat<br>[05:48] card. And for our container, I'm going<br>[05:51] to rename this stat card wrapper. Now,<br>[05:55] for these stat cards, since there's<br>[05:57] going to be multiple of them, I'm going<br>[05:58] to go ahead and give this a class<br>[06:00] because it is going to help us inside<br>[06:01] this demo. So, we'll just call this stat<br>[06:03] card. Go ahead and create that class.<br>[06:07] And then inside of here, I want to set<br>[06:08] some of that styling. So, it had a white<br>[06:10] background.<br>[06:11] It had about 24 pixels of padding on the<br>[06:13] top and 40 on the left and right. We'll<br>[06:16] go into our border radius and we're<br>[06:19] going to change this to 40 pixels of<br>[06:20] border radius. And while we're here,<br>[06:23] let's go ahead and go into our<br>[06:24] typography and set that text alignment<br>[06:26] to center. And now we can go ahead and<br>[06:28] add a paragraph here. This first one<br>[06:30] said 7 miles. And then another paragraph<br>[06:33] underneath it. Go ahead and make sure to<br>[06:35] use the generate blocks text block as<br>[06:37] well. We probably want to put classes on<br>[06:39] these as well. So, this is going to be<br>[06:41] stat card<br>[06:43] description.<br>[06:45] Go ahead and save that. We want to make<br>[06:48] sure to get rid of that bottom margin on<br>[06:50] it. And this is going to be our stat<br>[06:52] card double title. Go ahead and create<br>[06:56] that as well. And I think we're going to<br>[06:58] make this quite a bit bigger. So, let's<br>[07:00] do something like three rim. We'll<br>[07:02] change the text color to the blue from<br>[07:04] our palette. And then we'll make sure to<br>[07:05] get rid of the bottom margin there as<br>[07:07] well. I think that's a good start at<br>[07:09] least. So, I'm going to go ahead and<br>[07:10] duplicate this twice. And I'll go ahead<br>[07:12] and fill in the rest of this content.<br>[07:14] So, I've done a little bit of mix of<br>[07:16] just putting content in and styling.<br>[07:18] This is probably the most styled, so<br>[07:19] we'll just stay with that for now. Here<br>[07:21] on the stack card wrapper, I do want to<br>[07:23] go ahead and change this to a display of<br>[07:25] flex so I can get these items next to<br>[07:26] each other. We'll go ahead and give this<br>[07:28] a column gap of 16 pixels. Eventually,<br>[07:31] I'm going to need a row gap, too. So,<br>[07:32] I'll go ahead and put it on here now,<br>[07:34] even though it's not going to really<br>[07:35] affect things. Now, in our stats, our<br>[07:39] CTA and stats card wrapper, let's go<br>[07:41] ahead and change that to flex as well. I<br>[07:44] want to change the alignment to center<br>[07:45] just to center align that button. And<br>[07:47] then I'm going to change the justify<br>[07:48] content to space between. That's just<br>[07:50] going to allow us to have the button<br>[07:52] wrapper over here on the left and then<br>[07:53] the stack card wrappers pushed all the<br>[07:55] way to the right. All right, we're<br>[07:57] getting a little bit closer now. Let's<br>[07:59] go back to our image wrapper. And I know<br>[08:01] I want to put a big border radius on<br>[08:02] this. I think it was 48 pixels inside my<br>[08:04] drawing. And I'm just going to go ahead<br>[08:06] and set that overflow to clip on both<br>[08:08] the X and Y axis. That's just going to<br>[08:11] make sure that it gives us a border<br>[08:13] radius on that image since the container<br>[08:15] that's holding the image is kind of<br>[08:17] clipping that off of there. And then I<br>[08:19] don't think we need to do anything else<br>[08:20] to our main wrapper here. So let's go<br>[08:22] ahead and start to get this grid set up.<br>[08:24] To do that, I'm going to go to the<br>[08:26] wrapper. We're going to change this to a<br>[08:27] display of grid. And then inside of our<br>[08:29] grid layout, I'm just going to use our<br>[08:31] little helper here for the two column<br>[08:33] grid. That's going to be a good start<br>[08:35] for us. Now, as far as the rows, we do<br>[08:37] have two rows here that we're going to<br>[08:39] be working with. But by default, the<br>[08:41] grid template columns is really set up<br>[08:42] to be auto, even though you don't see<br>[08:44] that. And that's just going to allow<br>[08:46] each one of the rows to be the size of<br>[08:48] the content inside of it. I just<br>[08:50] mentioned this because you don't want to<br>[08:51] put one FR 1 FR here. That's going to<br>[08:54] make both of these rows the same height,<br>[08:56] which really isn't what we want in this<br>[08:57] situation because our top row is bigger<br>[09:00] than our smaller row. So, we'll just get<br>[09:01] rid of that and leave it blank. And<br>[09:03] that's a good starting place for us. But<br>[09:05] now we need to start placing everything<br>[09:06] on the grid. If we go to our image<br>[09:09] wrapper here, we'll go inside of layout<br>[09:11] and then grid layout. And we can go down<br>[09:13] to our grid column. If we remember back<br>[09:15] to our Figma drawing, this was going to<br>[09:17] span columns 2 to three. And it was<br>[09:19] going to spans row 1 2 3, which is going<br>[09:22] to allow it to overlap here. Now, for<br>[09:25] our stat cards, we're going to go into<br>[09:27] that same box here, and under grid<br>[09:28] column, we're going to do one to three,<br>[09:30] which is going to allow it to span all<br>[09:32] the way across. And then rows two over<br>[09:35] three, which is going to have it overlap<br>[09:37] on top of that image. So, if I click off<br>[09:39] of everything now, it looks quite a bit<br>[09:41] better. I didn't explicitly tell this<br>[09:43] main content where to live. That's<br>[09:45] working okay right now, but just to be<br>[09:47] safe, I'm going to go ahead and tell<br>[09:48] this to live in grid column 1 over2 and<br>[09:50] grid row 1 over2 just so nothing gets<br>[09:53] out of alignment. So now we're a lot<br>[09:55] closer to that layout. But of course, we<br>[09:57] need to work with some of that spacing<br>[09:58] here. If we go back to our Figma drawing<br>[10:00] here, we can see that there's actually a<br>[10:02] little bit of padding on top of this<br>[10:04] heading and below this text. And then of<br>[10:06] course, these stack cards don't go all<br>[10:08] the way to the corner here. They have a<br>[10:09] little bit of space over on the right<br>[10:11] and the bottom. So, let's go ahead and<br>[10:13] take care of those things. I'm going to<br>[10:15] grab our main content wrapper here.<br>[10:17] We're going to go inside of our spacing.<br>[10:19] I'm going to give this maybe 60 pixels<br>[10:21] of top padding, maybe 120 of right just<br>[10:25] to push it away from that image. I do<br>[10:26] want the image to take up half of the<br>[10:28] container, which is why I'm not using<br>[10:29] gap here because that would evenly push<br>[10:32] these things away from each other. And<br>[10:34] then we'll do 60 pixels at the bottom<br>[10:35] just to give a little bit of space at<br>[10:37] the bottom here. Now, for our stack<br>[10:40] cards, I'm going to use the same trick<br>[10:41] here, just by using padding. So, we'll<br>[10:43] go in here to our spacing, and we wanted<br>[10:45] 24 from the right and 24 from the<br>[10:47] bottom, which will just make sure that<br>[10:49] those stack cards don't go all the way<br>[10:51] to the bottom of the image. They just<br>[10:52] have a little bit of reveal next to<br>[10:54] them. So, at this point, we're pretty<br>[10:55] close to this desktop layout. So, let's<br>[10:57] go ahead and save these changes and go<br>[10:59] preview things on the front end.<br>[11:01] Everything looks pretty good here on<br>[11:03] desktop. I would be pretty happy with<br>[11:04] this layout as is. But as we go into the<br>[11:07] inspector and start looking at things<br>[11:09] responsively, we're definitely going to<br>[11:10] run into some problems. The first one<br>[11:12] here is that we have a collision in our<br>[11:14] stack card and CTA wrapper. Once these<br>[11:17] collide here, everything breaks to<br>[11:18] multiple lines and it looks pretty<br>[11:20] terrible. And eventually, I don't think<br>[11:22] we want this main content next to this<br>[11:24] image because everything's getting so<br>[11:26] skinny. We're going to want that stuff<br>[11:27] to stack on top of each other. Now, as<br>[11:30] we get even smaller, this problem just<br>[11:32] gets worse and things start overflowing.<br>[11:34] So, let's just start here where that<br>[11:35] first collision happens. If we go in<br>[11:38] here, we can see it actually collides<br>[11:39] around the 1100 mark, but I don't even<br>[11:41] want them getting that close. We could<br>[11:44] fix that with some gap inside that<br>[11:45] wrapper, but I think we can just go<br>[11:47] ahead and set our media query maybe here<br>[11:49] around 11:30. That would give us a good<br>[11:51] place to go ahead and change this layout<br>[11:53] so that these things never get close to<br>[11:55] colliding. So, I'm going to go ahead and<br>[11:57] copy this 11:30 to my clipboard. And<br>[11:59] we'll go back into the editor. And what<br>[12:01] I want to do is work on this CTA and<br>[12:03] stats card wrapper here. So I'm going to<br>[12:05] go ahead and go into my media queries<br>[12:07] and we're going to type in at media.<br>[12:09] Open our parenthesis and then we're<br>[12:11] going to type in max hyphen width. Paste<br>[12:13] in that pixel value. Write pixels next<br>[12:16] to it and go ahead and close those<br>[12:17] parenthesis and hit create. Now<br>[12:19] unfortunately we're not previewing at<br>[12:21] this break point. So we're going to have<br>[12:23] to use our imagination as we set all of<br>[12:25] this up. But we can go check things on<br>[12:27] the front end as well. Basically, what I<br>[12:29] want to do here is change this flex<br>[12:31] direction to column, which is going to<br>[12:33] stack this button and these stack cards<br>[12:35] on top of each other. Let's just take<br>[12:37] this step by step. I'll go ahead and<br>[12:39] save that there. Refresh it. And now we<br>[12:41] can see that these things are stacked on<br>[12:43] top of each other. But I think the CTA<br>[12:45] should actually go below these stack<br>[12:47] cards. So instead of just column, let's<br>[12:49] do this column reverse. We also had a<br>[12:52] problem with these two things being<br>[12:53] right next to each other. So let's just<br>[12:55] make sure that they have a row gap here.<br>[12:57] We'll do something like 16 pixels since<br>[12:59] I have 16 pixels in between each one of<br>[13:01] these stack cards. Again, let's just go<br>[13:04] ahead and save those changes. Now, we<br>[13:06] can see the button is below the stack<br>[13:07] cards, which I like. But I think I want<br>[13:09] these stack cards to go ahead and fill<br>[13:11] up the entire width. And I want this<br>[13:13] button to be over here on the left hand<br>[13:15] side. So, let's go back in here into our<br>[13:18] sizing. I'm going to make sure that this<br>[13:20] entire wrapper spans a 100% of the<br>[13:23] width. and we'll go into our layout<br>[13:25] alignment and set all the align items to<br>[13:28] left. That should go ahead and fix those<br>[13:30] things. So, let's just go ahead and<br>[13:32] refresh now. I think that looks pretty<br>[13:34] good. And I like that these stack cards<br>[13:35] don't actually fill the entire width.<br>[13:37] They just kind of overlap. I think<br>[13:38] that's a nice little nod to the desktop<br>[13:40] layout where things overlap as well. I<br>[13:42] think the only thing I don't like is<br>[13:43] this gap here. I think that's too small.<br>[13:45] We should probably go with something<br>[13:46] bigger. So, let's just go back into that<br>[13:49] gap. Maybe we'll change it to 24. That<br>[13:51] still might not be enough, but it'll<br>[13:52] give us a better look. Okay, I'm pretty<br>[13:55] happy with this for the 11:30 break<br>[13:57] point, but let's see where our next<br>[13:58] problem comes into place. We don't<br>[14:00] really have any collisions here, but I<br>[14:02] think things are just getting too skinny<br>[14:03] for this to be a two column layout. So,<br>[14:05] we need to figure out where we want this<br>[14:07] to break. I think it's okay right here.<br>[14:10] I don't absolutely hate it. Even though<br>[14:11] we could tighten up that spacing,<br>[14:13] there's just going to be so few people<br>[14:14] viewing this on a tablet that I don't<br>[14:16] stress over this too much. I think it's<br>[14:18] okay, but not perfect. But I think once<br>[14:20] we get down here, it's starting to just<br>[14:22] get too skinny. So, let's just pick a<br>[14:25] break point. I'm going to say this is<br>[14:27] 977. Let's just say a th00and. So, I'll<br>[14:29] put a th00and in here. And let's choose<br>[14:31] that for when we want this to stack into<br>[14:33] a single column. So, we'll go back into<br>[14:36] our editor here. We're going to go into<br>[14:38] the wrapper. And again, I'm going to go<br>[14:40] ahead and create a media query by doing<br>[14:42] at media, open our parenthesis, and do<br>[14:44] max width. and then we'll type in 1,00<br>[14:49] pixels and go ahead and close our<br>[14:51] parenthesis here. Now, right now, this<br>[14:54] is still using display grid even though<br>[14:56] we're seeing default in here. It's just<br>[14:57] being inherited down. So, all we need to<br>[15:00] do is go into this grid layout and<br>[15:01] change this to a one column grid. That's<br>[15:04] not going to fix things because we have<br>[15:06] children of this grid spanning multiple<br>[15:08] rows and multiple columns. So, let's<br>[15:10] just make sure that nothing is spanning<br>[15:11] more than one column since our grid is<br>[15:13] only one column wide. Now, this main<br>[15:16] content is 1 over2, so we're okay. This<br>[15:19] image wrapper is 2 over3. We want to go<br>[15:21] ahead and change that back to 1 over<br>[15:23] two, just so it doesn't go past the<br>[15:25] amount of width we have. Same thing for<br>[15:28] our stack cards here. I just want to<br>[15:29] make sure that that's set to 1 over two.<br>[15:32] That should fix all the horizontal<br>[15:34] stuff, but obviously we have a problem<br>[15:35] with things overlapping now since some<br>[15:37] of these things are set to be on the<br>[15:39] same grid row. So, let's go ahead and go<br>[15:41] back into our main content. We want this<br>[15:43] to be the first thing. So, it's going to<br>[15:45] be 1 over two. We'll go into our image<br>[15:47] wrapper and we'll do this two over<br>[15:49] three. So, it goes below that text. And<br>[15:52] then for our stack cards, we'll make<br>[15:53] sure that this is three over four, which<br>[15:56] will just put it below our image there.<br>[15:59] Again, let's just go ahead and save<br>[16:01] those changes and see how things are<br>[16:02] looking. Now, I think this single column<br>[16:04] looks quite a bit better, but we do have<br>[16:06] that padding on the top and bottom of<br>[16:08] our main content as well as on the<br>[16:10] right. So, let's go ahead and fix that<br>[16:12] while we're still working inside this<br>[16:14] media query. We'll go back in here to<br>[16:16] our spacing and change this all back to<br>[16:18] zero. Of course, we're going to want<br>[16:20] some gaps between these things. So,<br>[16:21] we'll go into that wrapper and we'll do<br>[16:23] a row gap of maybe 24. Actually, I think<br>[16:26] something like 32 pixels might look a<br>[16:28] little bit better. Again, let's just go<br>[16:30] ahead and save those changes and see how<br>[16:31] we're doing. I think at this point, I do<br>[16:34] want all these cards to span the entire<br>[16:36] width. So, we'll go in here to our stat<br>[16:38] card. And luckily, we put a class on it.<br>[16:40] I should be able to just go in here and<br>[16:41] do a flex grow of one. Go ahead and save<br>[16:44] those changes. Refresh here on the front<br>[16:47] end. That's still not filling up all<br>[16:49] that space. So, let's see what is not<br>[16:50] being able to expand. We'll make sure<br>[16:52] that this flex div is also allowed to go<br>[16:55] 100%. And now our stack cards are able<br>[16:57] to span that entire width. You can see<br>[17:00] they're not quite going to the edge<br>[17:01] here. And that's because the padding we<br>[17:03] had on that stack card wrapper. So,<br>[17:05] let's make sure we're inside that CTA<br>[17:07] and stack cards. We'll go inside of the<br>[17:09] spacing and let's change that bottom<br>[17:11] padding and right padding to zero.<br>[17:13] Again, go ahead, save those changes and<br>[17:15] refresh on the front end. And I think<br>[17:17] we're looking pretty good at this 1,000<br>[17:19] break point. So, let's just keep<br>[17:21] shrinking things down and see where they<br>[17:22] break again. And here you'll see that<br>[17:25] our headlines inside of our stack card<br>[17:27] start to go to two lines and break,<br>[17:29] which looks kind of funky. So, I think<br>[17:30] there's two things I want to do here.<br>[17:32] One, I think these headings can just be<br>[17:34] smaller at this point. And two, I think<br>[17:36] we could make these stack cards kind of<br>[17:38] wrap so that they never break onto two<br>[17:40] lines. So, let's see exactly where this<br>[17:43] happens. If I go ahead and stretch this<br>[17:45] up, we're okay here at 821.<br>[17:48] But when we get down to 8:19, things<br>[17:50] start to break. Just to make it an even<br>[17:52] number, I'm going to go ahead and copy<br>[17:53] that 820 to my clipboard. We'll go to<br>[17:56] our stat card wrapper. And again, we're<br>[17:58] going to go ahead and create a media<br>[17:59] query by doing at media. Open our<br>[18:02] parenthesis max width.<br>[18:05] paste in that 820 pixels and go ahead<br>[18:07] and create that. Now, what we want to do<br>[18:10] first here is just allow all these cards<br>[18:12] to wrap. So, I'm just going to go here<br>[18:14] onto flex wrap and choose wrap. And then<br>[18:17] for our stack card titles, we'll go<br>[18:19] ahead and go into that class as well.<br>[18:21] And I'm going to change this down to<br>[18:22] maybe two rim just to make it a little<br>[18:24] bit more proportionate. Again, we'll go<br>[18:26] ahead and save those changes. Refresh<br>[18:28] here. And now, I think these titles look<br>[18:30] a little bit more appropriate. So, let's<br>[18:32] go ahead and shrink things down. And we<br>[18:34] can see our flex wrap is working nicely<br>[18:36] once these titles would go onto two<br>[18:38] lines. Instead, it's just wrapping these<br>[18:40] boxes. So, we get a bigger box down here<br>[18:42] at the bottom, which I think is a nice<br>[18:43] kind of bento looking layout. Go ahead<br>[18:45] and keep scrunching things down here.<br>[18:48] And eventually, we get to where all of<br>[18:49] these stack on top of each other, which<br>[18:51] is totally fine with me. The only thing<br>[18:53] I don't love about this is that the<br>[18:54] image is kind of short here. Since we<br>[18:56] don't have much width to work with, the<br>[18:58] image just looks a little bit too small.<br>[19:00] So, I think I want to affect that once<br>[19:02] these stack cards break into a single<br>[19:04] column, which happens right around here.<br>[19:06] That is right around the 485 mark. I'm<br>[19:08] going to go ahead and copy that to my<br>[19:10] clipboard. We're going to go back to<br>[19:11] this image wrapper again. Another media<br>[19:14] query at media max width. Paste in that<br>[19:18] 485 pixels. Go ahead and create that.<br>[19:22] And then for this image wrapper, all I'm<br>[19:24] going to do to that is change an aspect<br>[19:26] ratio. I'm going to do this one over one<br>[19:28] just so the image is a big square. here.<br>[19:30] I think that's going to look a little<br>[19:31] bit better in our layout. Again, I'll<br>[19:33] refresh here. And now the image is more<br>[19:35] substantial and takes up a little bit<br>[19:37] more room. So, these stat cards don't<br>[19:38] take up so much emphasis on the page.<br>[19:41] And here, everything should shrink down<br>[19:43] nicely. And now we have a fully<br>[19:44] responsive layout of this hero section.<br>[19:47] I just find it so funny when people want<br>[19:48] to argue about what's better, flex or<br>[19:50] grid. And as you can see from a demo<br>[19:52] like this, they both have their<br>[19:53] strengths and weaknesses. We had to use<br>[19:55] a combination of CSS grid and flexbox to<br>[19:57] accommodate everything we needed inside<br>[19:59] this layout. While CSS grid made it<br>[20:02] really nice to be able to overlap things<br>[20:03] and keep things exactly in place where<br>[20:05] we needed them to. Things like our stack<br>[20:07] cards just work a whole lot better when<br>[20:08] you're using flexbox. So understanding<br>[20:10] both of these display properties is<br>[20:12] really the key to being able to build<br>[20:14] out all the layouts you want. Hopefully<br>[20:15] you learned something in today's video.<br>[20:17] I would love to know what your favorite<br>[20:18] part of this was. So make sure to leave<br>[20:20] me a comment down below. And if you want<br>[20:21] to make sure to catch the next one, then<br>[20:23] hit subscribe and we'll see you
<!-- deep-read:sections end -->
## ๐บ Video

---
# ๐ Full Notes (Deep-Read Analysis)
# ๐ท๏ธ Title: Sick new hero design punches way above its weight!
## ๐งฐ Action Inbox
- [H1] Create 2x2 CSS grid with uneven rows for hero layout โ 00:00-02:30 #css-grid
- [H2] Use grid positioning to achieve overlapping elements โ 05:23-08:45 #layout
- [H3] Implement responsive breakpoints with media queries โ 15:30-22:00 #responsive
## ๐งญ Table of Contents
- [๐ Summary](#-summary)
- [๐ Main Content](#-main-content)
- [๐๏ธ Notes](#๏ธ-notes)
- [๐ References](#-references)
- [๐ฃ๏ธ Paraphrase](#๏ธ-paraphrase)
- [๐ฐ Newsletter](#-newsletter)
- [โ
Action Items](#-action-items)
- [๐งช Hypotheses](#-hypotheses)
- [๐ Methodology](#-methodology)
- [โ Questions](#-questions)
- [๐ฎ Future Research](#-future-research)
- [๐ก Implications](#-implications)
- [๐ง Learning Styles Assessment](#-learning-styles-assessment)
- [๐ Accessibility Assessment](#-accessibility-assessment)
- [๐ DEIB Assessment](#-deib-assessment)
- [โ
Logical Validity](#-logical-validity)
- [๐ก๏ธ DARVO Analysis](#-darvo-analysis)
- [๐ฏ Conclusion](#-conclusion)
### ๐ References
- [Video Source](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
## ๐ Summary
- Tutorial demonstrates building a complex hero layout with overlapping elements using CSS Grid
- Combines CSS Grid for positioning with Flexbox for component alignment
- Covers responsive design implementation with multiple breakpoints
- Uses GenerateBlocks WordPress page builder for practical implementation
- Shows how grid positioning allows precise control over overlapping content
## ๐ Main Content
The video teaches how to create a sophisticated hero section layout that features overlapping elements using CSS Grid. The design includes main content, a large image, and stat cards that overlap the image in an aesthetically pleasing way. The instructor explains the grid system conceptually before implementing it practically, showing how to use grid line numbers for precise positioning. The tutorial also covers making the layout fully responsive using media queries and combining CSS Grid with Flexbox where appropriate.
## ๐๏ธ Notes
#### โฑ๏ธ [00:00](https://youtu.be/eKIiUaHnvlQ?t=0) โ [H1] Project overview and grid planning
- Key idea: Complex overlapping layouts can be simplified using CSS Grid
- Evidence: "A layout like this really lends itself to using CSS grid"
#### โฑ๏ธ [02:30](https://youtu.be/eKIiUaHnvlQ?t=150) โ [H2] Grid structure breakdown
- Key idea: 2x2 grid with uneven row heights handles the layout
- Evidence: "What we have here is essentially a 2x2 grid. We have two columns running on the left and right and then two rows"
#### โฑ๏ธ [04:15](https://youtu.be/eKIiUaHnvlQ?t=255) โ [H3] Grid positioning strategy
- Key idea: Grid line numbers control precise element placement
- Evidence: "Our image needs to span from column 2 to column 3... from row one and go all the way down to row three"
#### โฑ๏ธ [06:30](https://youtu.be/eKIiUaHnvlQ?t=390) โ [H1] Building the HTML structure
- Key idea: Three main containers handle content, image, and overlapping elements
- Evidence: "We're going to need three boxes... main content... image wrapper... CTA plus stat cards"
#### โฑ๏ธ [09:45](https://youtu.be/eKIiUaHnvlQ?t=585) โ [H2] Styling stat cards component
- Key idea: Flexbox handles internal card layout and spacing
- Evidence: "Change this to a display of flex so I can get these items next to each other"
#### โฑ๏ธ [12:20](https://youtu.be/eKIiUaHnvlQ?t=740) โ [H3] Implementing CSS Grid layout
- Key idea: Grid template creates the foundation for positioning
- Evidence: "We're going to change this to a display of grid... use our little helper here for the two column grid"
#### โฑ๏ธ [13:45](https://youtu.be/eKIiUaHnvlQ?t=825) โ [H1] Grid positioning implementation
- Key idea: Explicit grid positioning creates overlapping effects
- Evidence: "Image wrapper... grid column 2 to three... rows 1 to 3... stat cards... column 1 to three... rows 2 to 3"
#### โฑ๏ธ [15:30](https://youtu.be/eKIiUaHnvlQ?t=930) โ [H2] Adding spacing and padding
- Key idea: Padding controls element spacing without affecting grid alignment
- Evidence: "120 of right just to push it away from that image... 24 from the right and 24 from the bottom"
#### โฑ๏ธ [17:00](https://youtu.be/eKIiUaHnvlQ?t=1020) โ [H3] First responsive breakpoint
- Key idea: 1130px breakpoint prevents collision between elements
- Evidence: "We can see it actually collides around the 1100 mark... set our media query maybe here around 11:30"
#### โฑ๏ธ [18:45](https://youtu.be/eKIiUaHnvlQ?t=1125) โ [H1] Stacking elements at medium screens
- Key idea: Flex direction column-reverse reorders content appropriately
- Evidence: "Change this flex direction to column... column reverse... button should go below these stack cards"
#### โฑ๏ธ [20:30](https://youtu.be/eKIiUaHnvlQ?t=1230) โ [H2] Single column grid at 1000px
- Key idea: Grid changes to single column with explicit row positioning
- Evidence: "Change this to a one column grid... main content 1 over 2... image wrapper 2 over 3... stack cards 3 over 4"
#### โฑ๏ธ [22:15](https://youtu.be/eKIiUaHnvlQ?t=1335) โ [H3] Card wrapping at 820px breakpoint
- Key idea: Flex wrap prevents text breaking to multiple lines
- Evidence: "Allow all these cards to wrap... flex wrap and choose wrap... change this down to maybe two rim"
#### โฑ๏ธ [23:30](https://youtu.be/eKIiUaHnvlQ?t=1410) โ [H1] Final mobile adjustments
- Key idea: Square aspect ratio improves image prominence on mobile
- Evidence: "Change an aspect ratio... one over one just so the image is a big square"
#### โฑ๏ธ [24:45](https://youtu.be/eKIiUaHnvlQ?t=1485) โ [H2] Grid vs Flexbox philosophy
- Key idea: Both CSS Grid and Flexbox have specific strengths for different use cases
- Evidence: "They both have their strengths and weaknesses... CSS grid made it really nice to overlap things... stack cards work better when using flexbox"
## ๐ References
- [CSS Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout)
- [CSS Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout)
- [GenerateBlocks](https://generateblocks.com/)
## ๐ฃ๏ธ Paraphrase
- Complex overlapping layouts become manageable when broken down into a simple 2x2 CSS Grid structure
- Grid line positioning allows precise control over how elements span columns and rows to create overlaps
- Responsive design requires multiple breakpoints with different layout strategies for each screen size
- Combining CSS Grid for positioning with Flexbox for alignment provides the most flexible solution
## ๐ฐ Newsletter
This week's design spotlight showcases an elegant solution for complex hero layouts using CSS Grid! The tutorial demonstrates how a seemingly complicated overlapping design breaks down into a simple 2x2 grid structure, making it accessible for WordPress developers at any skill level.
Key takeaways include using grid line numbers for precise positioning, implementing responsive breakpoints that prevent element collisions, and knowing when to combine CSS Grid with Flexbox for optimal results. The practical GenerateBlocks implementation makes this immediately applicable to client projects.
Resources: [CSS Grid Guide](https://css-tricks.com/snippets/css/complete-guide-grid/), [Flexbox Guide](https://css-tricks.com/snippets/css/a-guide-to-flexbox/), [GenerateBlocks Documentation](https://docs.generateblocks.com/)
## โ
Action Items
#### WordPress
- Core: Evaluate grid layout support in block editor themes
- Themes: Review theme grid implementation patterns and responsive strategies
- Design: Create grid layout component library for block themes
#### Community
- Contributors: Document CSS Grid best practices for WordPress themes
- Maintainers: Establish grid layout standards for block patterns
## ๐งช Hypotheses
- CSS Grid adoption increases when developers see practical overlapping layout examples
- Combining Grid and Flexbox reduces development time compared to using either alone
- Multiple responsive breakpoints prevent layout collisions better than single breakpoints
- Visual grid planning improves implementation accuracy and reduces debugging time
### ๐ Methodology
- A/B test grid vs flexbox-only implementations measuring development time
- User testing on responsive breakpoint effectiveness across devices
- Survey developers on CSS Grid confidence before/after practical tutorials
### โ Questions
- How does CSS Grid browser support impact adoption in WordPress themes?
- What's the optimal number of responsive breakpoints for complex layouts?
- How can WordPress block patterns better leverage CSS Grid capabilities?
### ๐ฎ Future Research
- CSS Subgrid implementation patterns for WordPress themes
- Container query integration with CSS Grid for component-level responsiveness
- Performance impact of complex grid layouts on WordPress sites
### ๐ก Implications
- Practice: Developers can create more sophisticated layouts without complex positioning hacks
- Education: Visual grid planning should precede code implementation in training materials
- Funding: Advanced CSS features require ongoing education budget allocation
### ๐ง Learning Styles Assessment
Reading level estimate: 8.5 (Flesch-Kincaid Grade Level)
#### ๐ Visual learners
- Present: Grid overlay diagrams, numbered grid lines, visual breakdowns
- Improve: Interactive grid visualizer, color-coded grid areas
#### ๐ Aural learners
- Present: Step-by-step verbal explanations, reasoning for each decision
- Improve: Audio-only version focusing on CSS concepts
#### ๐ฃ๏ธ Verbal learners
- Present: Clear terminology definitions, analogies to physical layouts
- Improve: Glossary of grid terms, comparison table Grid vs Flexbox
#### ๐งฉ Kinesthetic learners
- Present: Hands-on building exercise, live code demonstration
- Improve: Downloadable starter files, practice exercises with variations
#### ๐ง Logical learners
- Present: Grid line numbering system, systematic breakpoint approach
- Improve: Decision tree for grid vs flexbox choice, responsive strategy flowchart
#### ๐งโ๐คโ๐ง Social learners
- Present: Comments section engagement, shared project showcase
- Improve: Community challenges, peer code review sessions
#### ๐งโโ๏ธ Solitary learners
- Present: Complete tutorial that can be followed independently
- Improve: Self-assessment checklist, troubleshooting guide
#### ๐ฟ Naturalistic learners
- Present: Organic layout evolution through breakpoints
- Improve: Layout ecosystem metaphors, natural spacing relationships
### ๐ Accessibility Assessment
#### Screen reader semantics
- Present: Clear heading structure, descriptive element names
- Improve: ARIA labels for grid regions, landmark roles
#### Keyboard navigation
- Present: Standard tab order through interactive elements
- Improve: Focus management in overlapping content areas
#### Contrast and readability
- Present: High contrast code examples, clear visual hierarchy
- Improve: Dark mode code examples, larger font options
#### Text resizing and reflow
- Present: Responsive design accommodates text scaling
- Improve: Test layout at 200% zoom explicitly
#### Media and captions
- Present: Video tutorial with clear visual demonstrations
- Improve: Closed captions, transcript with timestamps
#### Forms and interactions
- Present: Clear button styling and hover states
- Improve: Focus indicators for all interactive elements
### ๐ DEIB Assessment
#### Cultural breadth
- Present: Generic "Richmond" location example
- Improve: Multiple city examples from different regions
#### Inclusive language
- Present: Technical terms clearly explained, neutral tone
- Improve: Avoid idioms like "punches above its weight"
#### Neurodiversity support
- Present: Step-by-step structure, clear progression
- Improve: Section summaries, progress indicators
#### Representation
- Present: Focuses on technical implementation
- Improve: Include diverse use cases beyond tourism sites
#### Psychological safety
- Present: Encouraging tone, acknowledges learning curve
- Improve: Explicit "no stupid questions" messaging
### โ
Logical Validity
#### Strong reasoning
- Deductive strength: Grid system principles correctly applied to specific layout
- Inductive strength: Responsive patterns generalized from specific breakpoint issues
- Causal reasoning: Clear cause-effect between grid positioning and overlapping results
- Analogical strength: Grid lines compared to physical layout constraints
#### Fallacies
- Appeal to popularity: "Grid videos have been really well-received" - popularity doesn't prove effectiveness
- False dilemma: Grid vs Flexbox framed as either/or when combination is often best
#### Tone of voice
- Overall tone: Educational and encouraging, demonstrates concepts clearly with practical examples
### ๐ก๏ธ DARVO Analysis
- Deny: No concerning content identified
- Attack: No attacking behavior present
- Reverse victim/offender: No relevant dynamics present
- Emotional cues and rhetoric: Positive, educational tone throughout
## ๐ฏ Conclusion
This tutorial effectively demonstrates that complex overlapping layouts become manageable when approached systematically through CSS Grid. The combination of visual planning, practical implementation, and responsive considerations provides a complete framework for building sophisticated hero sections. The key insight is that understanding both CSS Grid and Flexbox strengths allows developers to choose the right tool for each specific layout challenge, resulting in cleaner, more maintainable code.
## ๐งฑ Refactor Appendix
### ๐ Literature Split Pad
### [H1] CSS Grid enables complex overlapping layouts
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ) by an unnamed author via [[YouTube]]. Published [MISSING]. Accessed 2024-12-19.
> "A layout like this really lends itself to using CSS grid"
Demonstrates practical application of grid for overlapping hero elements.
[view highlight](https://youtu.be/eKIiUaHnvlQ?t=0#H1) #xref #articleseed ID:rw_001
### [H2] Grid line positioning provides precise control
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
> "Our image needs to span from column 2 to column 3 and from row one to row three"
Shows how numbered grid lines enable exact element placement.
[view highlight](https://youtu.be/eKIiUaHnvlQ?t=255#H2) #xref ID:rw_002
### [H3] Responsive breakpoints prevent layout collisions
> [!quote] [Sick new hero design punches way above its weight!](https://www.youtube.com/watch?v=eKIiUaHnvlQ)
> "We can see it collides around the 1100 mark, so we'll set our media query at 11:30"
Strategic breakpoint selection maintains layout integrity across devices.
[view highlight](https://youtu.be/
---
# ๐ Full Transcript
*Auto-generated from YouTube captions ยท timestamps roughly every 30 seconds ยท [watch on YouTube](https://www.youtube.com/watch?v=eKIiUaHnvlQ)*
**[00:00]** I just started designing a new project for a client, and when I came up with this hero layout, I was really excited about how it turned out, but a little bit worried about exactly how I would build it. There's some overlapping pieces here and some interesting things that I don't see in every single project. A layout like this really lends itself to using CSS grid, and in the last few grid videos I've done, they've been really wellreceived. So, I thought we'd break this layout down today to talk about how we can make this into its most simplistic form, lay out this grid, and then figure out how to place
**[00:30]** everything inside the cells we need to to get that cool overlapping effect. I think it's a pretty neat little trick, and you'll learn a few things along the way. So, if that sounds interesting to you, then stick around and let's get started. So, we'll just kind of ignore the header for now. We're not going to worry about that in this demo. What we're really focused on is this hero section. So you can see we have this main content over here on the left. Underneath it we have a CTA, this explore Richmond button and a row of stat cards that kind of overlap the image that's over on the right hand side. So if we overlay a possible grid
**[01:03]** on top of this, what we have here is essentially a 2x two grid. We have two columns running on the left and right and then two rows, one on the top and one on the bottom. Now the columns are even. They're just split 50/50 right down the middle of the screen, but the rows are actually different heights. This top row is quite a bit bigger than the bottom row, even though this bottom row has quite a bit of padding in between the cards and the top and bottom of its constraints. So, if we look at each individual piece here, we have this main content that kind of goes in the
**[01:33]** top left. It doesn't overlap anything. So, we can put it in the first column and the first row. Now, the image goes next to it. It doesn't overlap columns here, but it does overlap rows. The image is going to span from the beginning to the end of the second column. And it's going to span all the way from the top of the first row to the bottom of the second row. And then we bring in the stack cards, which are going to span the entire width. So from the start of the first column to the end of the first column, but it's only going to span one row, which is the second row
**[02:04]** in here. So we want it to start at that second row line and finish at the third. This way we can get our image and stack cards to overlap just the way we want it. If we go back to our drawing here, we have our columns and our rows. The columns are numbered starting with one all the way on the left hand side. The next one is two and then the end of this second column is three. So it can be a little bit confusing when you're dealing with column two to say to go to three, but we're counting the start of each one of these lines. The same thing happens with the rows, but here we start at the
**[02:35]** top and then work our way down. So since we have two rows, we have these grid lines 1 2 and three. So in order to place this content, we need to think about what grid cells everything needs to live in. Our main content here can go from 1 to two and from one to two on the rows, which is what it's going to do by default. Our image, however, needs to span from column 2 to column 3. So it starts on this second column here and goes all the way to the end. And then for the rows, it needs to start at row one and go all the way down to row three
**[03:07]** so that it can expand to the bottom of our grid. And finally, this CTA row, it's going to start at row two and go to row three. And it's also going to start from column one and go over to column 3. Of course, this is just a lot of talk about theory, but I wanted to set this up so you could see what I was doing once I got into the builder. And hopefully then it will all start to click. So, let's go ahead and jump inside generate blocks now and start to build some of this out. Now, I don't have any kind of framework installed here, but I do have a few little helpers like my little section reusable block
**[03:38]** that we'll reuse throughout this. We have a button class as well, but for the most part, I'm going to be doing all of this from scratch. So, we have our section with our inner wrapper. Of course, the inner wrapper is just constraining our content width. And inside of it, essentially, we're going to need three boxes. This first one here, we'll go ahead and rename. This is going to be our main content. I'm just going to label these the same as I did inside of Figma. This is going to be our image wrapper. And then here at this last container, we'll rename that. That's going to be our CTA plus our stat cards.
**[04:10]** Now, inside of this main content, we know that we're going to need a headline, which is just going to say choose a city that lets you breathe. I'm going to go ahead and change this to an H1. We also had a little highlight on the word breathe here, so I'm going to go ahead and do that. Of course, this isn't a full site, so I should be putting classes on all these things. But for the point of demo, I'm just going to do this on the default generate blocks classes since this isn't going to expand to anything bigger in this site. Now, under that, we're going to need a text block. And I'll just paste in the text from our Figma drawing. I want to make
**[04:40]** sure to go ahead and get rid of the bottom margin that comes on those paragraphs. So, we can go ahead and snug things up there. Now, next, inside this image wrapper, I want to go ahead and put an image. We'll grab the image I already have in my media library. I do want to make sure to change the display of that to block. If not, there's a little bit of margin at the bottom of this that kind of gets in the way. And then I just want to make sure to set the width and height both to 100%. Because I'm going to want this to always fill up that container. And then inside of our stack cards, we're going to have two containers in
**[05:11]** here as well. The first one is going to be our button wrapper. So I'll just go ahead and put a button in here. Now, you don't necessarily need to put this button inside of a container. It could just be directly inside the stack cards wrapper, but just in case I ever want to put something else in here, I have that option and it's not really hurting anything. So, in here, this is going to say explore Richmond, Virginia. And like I said, I already have a class set up for my buttons here. So, I'm just going to go ahead and add that so we don't have to style that button completely from scratch. Now, inside this wrapper, this is what's
**[05:42]** going to hold all my stat cards. I'm going to have my individual stat card here. I'll go ahead and rename this stat card. And for our container, I'm going to rename this stat card wrapper. Now, for these stat cards, since there's going to be multiple of them, I'm going to go ahead and give this a class because it is going to help us inside this demo. So, we'll just call this stat card. Go ahead and create that class. And then inside of here, I want to set some of that styling. So, it had a white background. It had about 24 pixels of padding on the
**[06:13]** top and 40 on the left and right. We'll go into our border radius and we're going to change this to 40 pixels of border radius. And while we're here, let's go ahead and go into our typography and set that text alignment to center. And now we can go ahead and add a paragraph here. This first one said 7 miles. And then another paragraph underneath it. Go ahead and make sure to use the generate blocks text block as well. We probably want to put classes on these as well. So, this is going to be stat card description.
**[06:45]** Go ahead and save that. We want to make sure to get rid of that bottom margin on it. And this is going to be our stat card double title. Go ahead and create that as well. And I think we're going to make this quite a bit bigger. So, let's do something like three rim. We'll change the text color to the blue from our palette. And then we'll make sure to get rid of the bottom margin there as well. I think that's a good start at least. So, I'm going to go ahead and duplicate this twice. And I'll go ahead and fill in the rest of this content. So, I've done a little bit of mix of
**[07:16]** just putting content in and styling. This is probably the most styled, so we'll just stay with that for now. Here on the stack card wrapper, I do want to go ahead and change this to a display of flex so I can get these items next to each other. We'll go ahead and give this a column gap of 16 pixels. Eventually, I'm going to need a row gap, too. So, I'll go ahead and put it on here now, even though it's not going to really affect things. Now, in our stats, our CTA and stats card wrapper, let's go ahead and change that to flex as well. I want to change the alignment to center just to center align that button. And
**[07:47]** then I'm going to change the justify content to space between. That's just going to allow us to have the button wrapper over here on the left and then the stack card wrappers pushed all the way to the right. All right, we're getting a little bit closer now. Let's go back to our image wrapper. And I know I want to put a big border radius on this. I think it was 48 pixels inside my drawing. And I'm just going to go ahead and set that overflow to clip on both the X and Y axis. That's just going to make sure that it gives us a border radius on that image since the container that's holding the image is kind of clipping that off of there. And then I
**[08:19]** don't think we need to do anything else to our main wrapper here. So let's go ahead and start to get this grid set up. To do that, I'm going to go to the wrapper. We're going to change this to a display of grid. And then inside of our grid layout, I'm just going to use our little helper here for the two column grid. That's going to be a good start for us. Now, as far as the rows, we do have two rows here that we're going to be working with. But by default, the grid template columns is really set up to be auto, even though you don't see that. And that's just going to allow each one of the rows to be the size of the content inside of it. I just
**[08:50]** mentioned this because you don't want to put one FR 1 FR here. That's going to make both of these rows the same height, which really isn't what we want in this situation because our top row is bigger than our smaller row. So, we'll just get rid of that and leave it blank. And that's a good starting place for us. But now we need to start placing everything on the grid. If we go to our image wrapper here, we'll go inside of layout and then grid layout. And we can go down to our grid column. If we remember back to our Figma drawing, this was going to span columns 2 to three. And it was going to spans row 1 2 3, which is going
**[09:22]** to allow it to overlap here. Now, for our stat cards, we're going to go into that same box here, and under grid column, we're going to do one to three, which is going to allow it to span all the way across. And then rows two over three, which is going to have it overlap on top of that image. So, if I click off of everything now, it looks quite a bit better. I didn't explicitly tell this main content where to live. That's working okay right now, but just to be safe, I'm going to go ahead and tell this to live in grid column 1 over2 and grid row 1 over2 just so nothing gets
**[09:53]** out of alignment. So now we're a lot closer to that layout. But of course, we need to work with some of that spacing here. If we go back to our Figma drawing here, we can see that there's actually a little bit of padding on top of this heading and below this text. And then of course, these stack cards don't go all the way to the corner here. They have a little bit of space over on the right and the bottom. So, let's go ahead and take care of those things. I'm going to grab our main content wrapper here. We're going to go inside of our spacing. I'm going to give this maybe 60 pixels of top padding, maybe 120 of right just
**[10:25]** to push it away from that image. I do want the image to take up half of the container, which is why I'm not using gap here because that would evenly push these things away from each other. And then we'll do 60 pixels at the bottom just to give a little bit of space at the bottom here. Now, for our stack cards, I'm going to use the same trick here, just by using padding. So, we'll go in here to our spacing, and we wanted 24 from the right and 24 from the bottom, which will just make sure that those stack cards don't go all the way to the bottom of the image. They just have a little bit of reveal next to them. So, at this point, we're pretty
**[10:55]** close to this desktop layout. So, let's go ahead and save these changes and go preview things on the front end. Everything looks pretty good here on desktop. I would be pretty happy with this layout as is. But as we go into the inspector and start looking at things responsively, we're definitely going to run into some problems. The first one here is that we have a collision in our stack card and CTA wrapper. Once these collide here, everything breaks to multiple lines and it looks pretty terrible. And eventually, I don't think we want this main content next to this image because everything's getting so
**[11:26]** skinny. We're going to want that stuff to stack on top of each other. Now, as we get even smaller, this problem just gets worse and things start overflowing. So, let's just start here where that first collision happens. If we go in here, we can see it actually collides around the 1100 mark, but I don't even want them getting that close. We could fix that with some gap inside that wrapper, but I think we can just go ahead and set our media query maybe here around 11:30. That would give us a good place to go ahead and change this layout so that these things never get close to colliding. So, I'm going to go ahead and
**[11:57]** copy this 11:30 to my clipboard. And we'll go back into the editor. And what I want to do is work on this CTA and stats card wrapper here. So I'm going to go ahead and go into my media queries and we're going to type in at media. Open our parenthesis and then we're going to type in max hyphen width. Paste in that pixel value. Write pixels next to it and go ahead and close those parenthesis and hit create. Now unfortunately we're not previewing at this break point. So we're going to have to use our imagination as we set all of this up. But we can go check things on the front end as well. Basically, what I
**[12:29]** want to do here is change this flex direction to column, which is going to stack this button and these stack cards on top of each other. Let's just take this step by step. I'll go ahead and save that there. Refresh it. And now we can see that these things are stacked on top of each other. But I think the CTA should actually go below these stack cards. So instead of just column, let's do this column reverse. We also had a problem with these two things being right next to each other. So let's just make sure that they have a row gap here. We'll do something like 16 pixels since
**[12:59]** I have 16 pixels in between each one of these stack cards. Again, let's just go ahead and save those changes. Now, we can see the button is below the stack cards, which I like. But I think I want these stack cards to go ahead and fill up the entire width. And I want this button to be over here on the left hand side. So, let's go back in here into our sizing. I'm going to make sure that this entire wrapper spans a 100% of the width. and we'll go into our layout alignment and set all the align items to left. That should go ahead and fix those
**[13:30]** things. So, let's just go ahead and refresh now. I think that looks pretty good. And I like that these stack cards don't actually fill the entire width. They just kind of overlap. I think that's a nice little nod to the desktop layout where things overlap as well. I think the only thing I don't like is this gap here. I think that's too small. We should probably go with something bigger. So, let's just go back into that gap. Maybe we'll change it to 24. That still might not be enough, but it'll give us a better look. Okay, I'm pretty happy with this for the 11:30 break point, but let's see where our next problem comes into place. We don't really have any collisions here, but I
**[14:02]** think things are just getting too skinny for this to be a two column layout. So, we need to figure out where we want this to break. I think it's okay right here. I don't absolutely hate it. Even though we could tighten up that spacing, there's just going to be so few people viewing this on a tablet that I don't stress over this too much. I think it's okay, but not perfect. But I think once we get down here, it's starting to just get too skinny. So, let's just pick a break point. I'm going to say this is 977. Let's just say a th00and. So, I'll put a th00and in here. And let's choose that for when we want this to stack into
**[14:33]** a single column. So, we'll go back into our editor here. We're going to go into the wrapper. And again, I'm going to go ahead and create a media query by doing at media, open our parenthesis, and do max width. and then we'll type in 1,00 pixels and go ahead and close our parenthesis here. Now, right now, this is still using display grid even though we're seeing default in here. It's just being inherited down. So, all we need to do is go into this grid layout and change this to a one column grid. That's
**[15:04]** not going to fix things because we have children of this grid spanning multiple rows and multiple columns. So, let's just make sure that nothing is spanning more than one column since our grid is only one column wide. Now, this main content is 1 over2, so we're okay. This image wrapper is 2 over3. We want to go ahead and change that back to 1 over two, just so it doesn't go past the amount of width we have. Same thing for our stack cards here. I just want to make sure that that's set to 1 over two. That should fix all the horizontal stuff, but obviously we have a problem
**[15:35]** with things overlapping now since some of these things are set to be on the same grid row. So, let's go ahead and go back into our main content. We want this to be the first thing. So, it's going to be 1 over two. We'll go into our image wrapper and we'll do this two over three. So, it goes below that text. And then for our stack cards, we'll make sure that this is three over four, which will just put it below our image there. Again, let's just go ahead and save those changes and see how things are looking. Now, I think this single column looks quite a bit better, but we do have
**[16:06]** that padding on the top and bottom of our main content as well as on the right. So, let's go ahead and fix that while we're still working inside this media query. We'll go back in here to our spacing and change this all back to zero. Of course, we're going to want some gaps between these things. So, we'll go into that wrapper and we'll do a row gap of maybe 24. Actually, I think something like 32 pixels might look a little bit better. Again, let's just go ahead and save those changes and see how we're doing. I think at this point, I do want all these cards to span the entire width. So, we'll go in here to our stat
**[16:38]** card. And luckily, we put a class on it. I should be able to just go in here and do a flex grow of one. Go ahead and save those changes. Refresh here on the front end. That's still not filling up all that space. So, let's see what is not being able to expand. We'll make sure that this flex div is also allowed to go 100%. And now our stack cards are able to span that entire width. You can see they're not quite going to the edge here. And that's because the padding we had on that stack card wrapper. So, let's make sure we're inside that CTA and stack cards. We'll go inside of the
**[17:09]** spacing and let's change that bottom padding and right padding to zero. Again, go ahead, save those changes and refresh on the front end. And I think we're looking pretty good at this 1,000 break point. So, let's just keep shrinking things down and see where they break again. And here you'll see that our headlines inside of our stack card start to go to two lines and break, which looks kind of funky. So, I think there's two things I want to do here. One, I think these headings can just be smaller at this point. And two, I think we could make these stack cards kind of wrap so that they never break onto two
**[17:40]** lines. So, let's see exactly where this happens. If I go ahead and stretch this up, we're okay here at 821. But when we get down to 8:19, things start to break. Just to make it an even number, I'm going to go ahead and copy that 820 to my clipboard. We'll go to our stat card wrapper. And again, we're going to go ahead and create a media query by doing at media. Open our parenthesis max width. paste in that 820 pixels and go ahead and create that. Now, what we want to do
**[18:10]** first here is just allow all these cards to wrap. So, I'm just going to go here onto flex wrap and choose wrap. And then for our stack card titles, we'll go ahead and go into that class as well. And I'm going to change this down to maybe two rim just to make it a little bit more proportionate. Again, we'll go ahead and save those changes. Refresh here. And now, I think these titles look a little bit more appropriate. So, let's go ahead and shrink things down. And we can see our flex wrap is working nicely once these titles would go onto two lines. Instead, it's just wrapping these boxes. So, we get a bigger box down here
**[18:42]** at the bottom, which I think is a nice kind of bento looking layout. Go ahead and keep scrunching things down here. And eventually, we get to where all of these stack on top of each other, which is totally fine with me. The only thing I don't love about this is that the image is kind of short here. Since we don't have much width to work with, the image just looks a little bit too small. So, I think I want to affect that once these stack cards break into a single column, which happens right around here. That is right around the 485 mark. I'm going to go ahead and copy that to my clipboard. We're going to go back to this image wrapper again. Another media
**[19:14]** query at media max width. Paste in that 485 pixels. Go ahead and create that. And then for this image wrapper, all I'm going to do to that is change an aspect ratio. I'm going to do this one over one just so the image is a big square. here. I think that's going to look a little bit better in our layout. Again, I'll refresh here. And now the image is more substantial and takes up a little bit more room. So, these stat cards don't take up so much emphasis on the page. And here, everything should shrink down nicely. And now we have a fully
**[19:44]** responsive layout of this hero section. I just find it so funny when people want to argue about what's better, flex or grid. And as you can see from a demo like this, they both have their strengths and weaknesses. We had to use a combination of CSS grid and flexbox to accommodate everything we needed inside this layout. While CSS grid made it really nice to be able to overlap things and keep things exactly in place where we needed them to. Things like our stack cards just work a whole lot better when you're using flexbox. So understanding both of these display properties is really the key to being able to build out all the layouts you want. Hopefully
**[20:15]** you learned something in today's video. I would love to know what your favorite part of this was. So make sure to leave me a comment down below. And if you want to make sure to catch the next one, then hit subscribe and we'll see you