Loading video...

Video Failed to Load

Go Home

Are you using position: absolute; to overlap elements? It's almost always better to Use CSS Grid instead!

302,097 views • 1 year ago •via X (Twitter)

11 Comments

Wes Bos's profile picture
Wes Bos1 year ago

Second video! Your questions + tips

Bruno Stasse's profile picture
Bruno Stasse1 year ago

And you can make it more concise with grid-area: 1 / 1;

Wes Bos's profile picture
Wes Bos1 year ago

👌😮‍💨 even better

trash's profile picture
trash1 year ago

i’m using absolute like i’m coding in the stone ages

Wes Bos's profile picture
Wes Bos1 year ago

absolute: chad;

James Landrum's profile picture
James Landrum1 year ago

It’s a hack but a hack that I love. And one that technically the layout engine is purposely written to support.

Wes Bos's profile picture
Wes Bos1 year ago

hah yeah, I'm not sure I'd even call it a hack - its a feature of CSS grid to have multiple items on grid rows/cols

Caleb Porzio's profile picture
Caleb Porzio1 year ago

My guy, this is fantastic

Wes Bos's profile picture
Wes Bos1 year ago

thanks my guy!

Alex Parra's profile picture
Alex Parra1 year ago

Cool demo! I dreamt of this back in 2017 And in 2020 posted it was possible with grid. There’s likely updates I need to make to that posts.

Wes Bos's profile picture
Wes Bos1 year ago

Awesome! I also included it in my course back then too. Just re-surfacing as I still don't see it used a ton

Related Videos