NorthWestWind 14 points 3 years ago

I prefer flex

path: 0 3384839, hotness: undefined, score: 14, children: 0
Muffi 6 points 3 years ago path: 0 3384840, hotness: undefined, score: 6, children: 0
onlinepersona 5 points 3 years ago

Is this a new CSS attribute?

path: 0 3373017, hotness: undefined, score: 5, children: 0
Swiggles 5 points 3 years ago

Now do html mail!

path: 0 3386813, hotness: undefined, score: 5, children: 3
FooBarrington 6 points 3 years ago

There is actually an approach which makes this reasonably easy: https://mjml.io/

path: 0 3386813 3387168, hotness: undefined, score: 6, children: 2
Swiggles 2 points 3 years ago

That's actually cool. I have to remember it next time I have to deal with html mail.

path: 0 3386813 3387168 3387704, hotness: undefined, score: 2, children: 1
FooBarrington 4 points 3 years ago

I'll pray for you that it doesn't come to that!

path: 0 3386813 3387168 3387704 3394193, hotness: undefined, score: 4, children: 0
shira 3 points 3 years ago

Put it in another div, make that one display:flex;justify-content:center;

path: 0 3384629, hotness: undefined, score: 3, children: 0
Crow 3 points 3 years ago

CSS grids are a godsend.

path: 0 3376136, hotness: undefined, score: 3, children: 0
simonced 2 points 3 years ago

set margin:auto to your div, and call it a day, no need of flex/grid whatever...

path: 0 3417277, hotness: undefined, score: 2, children: 0
OneFJef 1 point 3 years ago
path: 0 3377874, hotness: undefined, score: 1, children: 0
Knusper 1 point 3 years ago

I only do webdev occasionally and yeah, I've noticed this tendency that I want to put everything in a CSS grid. At this point, I'm worried I end up with a layout that's about as responsive as the early-2000s table layouts. 🙃

path: 0 3384477, hotness: undefined, score: 1, children: 4
adrian783 4 points 3 years ago

grid and responsiveness are not antithetical. I mean the concept of grid had been around for like a decade, see bootstrap.

path: 0 3384477 3384956, hotness: undefined, score: 4, children: 1
Knusper 1 point 3 years ago

Yeah, I've done responsive grids before. Problem is, I'm currently working on a single-page web music player and it's so easy to just nail all the UI elements down. Like I might want to have the play button always appear to the left of the playback bar. But that obviously can't reflow naturally on smaller screens. Although reflowing that example won't look good either.

I guess, I'm still figuring out, if I ever actually want things to reflow. I might just need to define static rules, so that on a small screen, the play button should appear in a different grid cell, next to the previous/next buttons, for example...

path: 0 3384477 3384956 3385874, hotness: undefined, score: 1, children: 0
Potatos_are_not_friends 3 points 3 years ago

Grid is made for responsive design.

If you're not familiar with grid, stick with flex, which kinda just works but doesn't have the strong control/structure as grid.

path: 0 3384477 3386460, hotness: undefined, score: 3, children: 0
PoolloverNathan 2 points 3 years ago

It's fine, my entire website is built on rock and roll grids.

path: 0 3384477 3394059, hotness: undefined, score: 2, children: 0
programmer_humor
programmer_humor

@programming.dev

login for more options
33653
2567
7610

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.

go to feed...