CSS grid-area example not working in chrome mobile

I'm watching the video "Why CSS grid-area is the best property for laying out content" (https://www.youtube.com/watch?v=duH4DLq5yoo) and have copied the code from codepen into an empty project. The columns work fine in desktop chrome but when accessing from phone or choosing "Mobile" in responsive view the areas does not stack. Anyone else have experienced this?
Kevin Powell
YouTube
Why CSS grid-area is the best property for laying out content
CSS Grid is amazing, and grid-area just make it so much better. When grid first launched I loved the idea of grid areas, but didn't get fully on board as it seemed like a little too much work... but once you start actually using them on a regular basis, you realize that while the initial setup in slightly longer, in the long run you can save a b...
12 Replies
Chris Bolson
Chris Bolson•2y ago
If you share your codepen somebody might be able to take a look
Myndi
Myndi•2y ago
Without code, it's impossible to tell. Type in "code.new" in the browser, and share it with us.
FredrikR
FredrikROP•2y ago
Gist
CSS Grid Example from Kevin Powel
CSS Grid Example from Kevin Powel. GitHub Gist: instantly share code, notes, and snippets.
Jochem
Jochem•2y ago
I think you mean https://pen.new
Myndi
Myndi•2y ago
No, just code.new to code in Assembly Kapp
FredrikR
FredrikROP•2y ago
I hope github gist above will suffice.
Myndi
Myndi•2y ago
I copied exactly what you posted.
FredrikR
FredrikROP•2y ago
Try copying it to actual files and serve it bare with a webserver of some kind. In Chrome responsive view, select Mobile and see if it stops working.
Mannix
Mannix•2y ago
try adding this meta tag <meta name="viewport" content="width=device-width, initial-scale=1"> to the head 😉
FredrikR
FredrikROP•2y ago
That was it! Thought it might be something that simple.
Mannix
Mannix•2y ago
for future if you have a good editor it probably has emmet installed so you can just ! and hit tab to get boiler plate html 🙂
Want results from more Discord servers?
Add your server