DEV Community


Discussion on: 5 lessons from 50 days of CSS art

madza profile image

What's your preferred CSS method for layouts? Like Grid, Flexbox, etc..

s_aitchison profile image
Suzanne Aitchison (she/her) Author

In my job I use flexbox and grid mostly, but for this project I've relied quite heavily on absolute positioning. Mostly because in creating an image like this, 9 times out of 10 (9 divs out of 10 haha) an element really does have a fixed position in relation to something else. Which isn't the case very often at all for building sites and apps!

A lot of my efforts so far aren't responsive at all (mostly due to me 'learning on the go' and the time constraints for pushing a piece out daily), but even when making responsive I'd still use absolute positioning a lot, just with more % values and attention to scale.

It does depend on the image though. If I need to line up a row of things, for example, I'd still use flexbox.