Use this instead of media queries or container queries

Kevin Powell February 6, 2024
Video Thumbnail

About

No channel description available.

Video Description

Media queries are a bit limited in how they work, and while container queries go a really long way in solving a lot of those limitations, there are intrinsic patterns that we can follow that allow us to do things that neither one of them can do. The setup is a bit strange and can look complex, but, in my opinion, it's also 100% worth it! 🔗 Links ✅ Why complex CSS is okay: https://youtu.be/OtqZKLdDNXY ✅ Finished version, flexbox example: https://codepen.io/kevinpowell/pen/MWxEjMx ✅ Finished version, grid example: https://codepen.io/kevinpowell/pen/abMLmeO ⌚ Timestamps 00:00 - Introduction 01:00 - What we're going to be creating 01:56 - New merch! 02:22 - Changing flexbox layout based on the width of one of its children 09:30 - The grid solution #css -- Come hang out with other dev's in my Discord Community 💬 https://discord.gg/nTYCvrK Keep up to date with everything I'm up to ✉ https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 https://www.twitch.tv/kevinpowellcss --- Help support my channel 👨‍🎓 Get a course: https://www.kevinpowell.co/courses 👕 Buy a shirt: https://teespring.com/stores/making-the-internet-awesome 💖 Support me on Patreon: https://www.patreon.com/kevinpowell --- My editor: VS Code - https://code.visualstudio.com/ --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Must-Have Plumbing Essentials

AI-recommended products based on this video

Loading...
PUREPLUS 10" x 4.5" Whole House Pleated Sediment Filter for Well Water, Replacement Cartridge for GE FXHSC, Culligan R50-BBSA, Pentek R50-BB, DuPont WFHDC3001, American Plumber W50PEHD, GXWH40L, 4Pack

PUREPLUS 10" x 4.5" Whole House Pleated Sediment Filter for Well Water, Replacement Cartridge for GE FXHSC, Culligan R50-BBSA, Pentek R50-BB, DuPont WFHDC3001, American Plumber W50PEHD, GXWH40L, 4Pack

(3,424)
$53.99
FREE delivery Tue, Sep 23
100+ bought in past month
Loading...
Salad Green Seed Pod Kits for AeroGarden Ahopegarden, iDOO Hydroponics Growing System Indoor Herb Garden, 400+ Seeds, Including American Fast Lettuce, Red Romaine Lettuce(8-Pods)

Salad Green Seed Pod Kits for AeroGarden Ahopegarden, iDOO Hydroponics Growing System Indoor Herb Garden, 400+ Seeds, Including American Fast Lettuce, Red Romaine Lettuce(8-Pods)

(28)
$60.74
FREE delivery Jun 13 - 18 Only 5 left in stock.
Loading...
Fungal Nail Treatment Liquid, Nail Fungus Treatment for Toenails, Toenail Fungus Treatment, Toe Nail Fungus Treatment, Toe Fungus Treatment Extra Strength, Fungus Nail Killer, Nail Antifungal, Fungal Nail Treatment for Fingernails - 30ML

Fungal Nail Treatment Liquid, Nail Fungus Treatment for Toenails, Toenail Fungus Treatment, Toe Nail Fungus Treatment, Toe Fungus Treatment Extra Strength, Fungus Nail Killer, Nail Antifungal, Fungal Nail Treatment for Fingernails - 30ML

(4)
$19.99
FREE delivery Thu, Sep 11 on your first order
Loading...
FOUBAM Queen Size Bed Frame with LED Lights and Charging Station, Heavy Duty Metal Bed with Fabric Storage Headboard,Solid and Stable, Metal Slats Support,Mattress Foundation (Black)

FOUBAM Queen Size Bed Frame with LED Lights and Charging Station, Heavy Duty Metal Bed with Fabric Storage Headboard,Solid and Stable, Metal Slats Support,Mattress Foundation (Black)

(152)
$225.19
FREE delivery Wed, Jun 25
50+ bought in past month
Loading...
FOUBAM Full Size Bed Frame with LED Lights and Charging Station, Heavy Duty Metal Bed with Storage Fabric Headboard,Solid and Stable, Metal Slats Support,Mattress Foundation (Black)

FOUBAM Full Size Bed Frame with LED Lights and Charging Station, Heavy Duty Metal Bed with Storage Fabric Headboard,Solid and Stable, Metal Slats Support,Mattress Foundation (Black)

(149)
$209.99
FREE delivery Mon, Jun 16
Loading...
Fathers Day Dad Gift Idea,16-in-1 EDC Multi Tool with Pocket Knife, Foldable Utility Knife Multitool with Safety Locking, Needle Nose Pliers and Wire Stripper Tools, Gifts for Dad, Fishing, Camping

Fathers Day Dad Gift Idea,16-in-1 EDC Multi Tool with Pocket Knife, Foldable Utility Knife Multitool with Safety Locking, Needle Nose Pliers and Wire Stripper Tools, Gifts for Dad, Fishing, Camping

(3)
$49.99
FREE delivery Thu, Jun 19
Loading...
ROCKTOL Multitool,19 in 1 Multitool Pliers with Titanium-Plated Handle Safety Locking Lightweight EDC Tool Nylon Sheath for Gifts,Men,Outdoor Survival,Hiking,Camping

ROCKTOL Multitool,19 in 1 Multitool Pliers with Titanium-Plated Handle Safety Locking Lightweight EDC Tool Nylon Sheath for Gifts,Men,Outdoor Survival,Hiking,Camping

(374)
$46.99
FREE delivery Thu, Jun 19
50+ bought in past month
Loading...
Pocket Multitool with Safety Locking Handy, Gifts for Men, 12 in 1 Multi Tool with Pliers Knife Bottle Opener Screwdriver Saw, Perfect for Outdoor, Survival, Camping, Hiking, Simple Repair

Pocket Multitool with Safety Locking Handy, Gifts for Men, 12 in 1 Multi Tool with Pliers Knife Bottle Opener Screwdriver Saw, Perfect for Outdoor, Survival, Camping, Hiking, Simple Repair

(2,461)
$27.98$26.99
FREE delivery Thu, Jun 19 on your first order
300+ bought in past month
Loading...
Soleilwear Mini Electric Screwdriver Set, 52 in 1 Precision Electric Screwdriver Cordless with 48 Magnetic Bits, Repair Tool Kit with Tweezers and Pry Bar

Soleilwear Mini Electric Screwdriver Set, 52 in 1 Precision Electric Screwdriver Cordless with 48 Magnetic Bits, Repair Tool Kit with Tweezers and Pry Bar

(83)
$49.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month