There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

simonced ,

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

Swiggles ,

Now do html mail!

FooBarrington ,

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

Swiggles ,

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

FooBarrington ,

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

Scrappy ,

I always redo flexboxfroggy.com whenever I touch flexbox again.

Muffi ,

Sound like you need to practice with some Flexbox Defense

NorthWestWind ,
@NorthWestWind@iusearchlinux.fyi avatar

I prefer flex

shira ,

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

Knusper , (edited )

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. 🙃

adrian783 ,

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

Knusper ,

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…

Potatos_are_not_friends ,

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.

PoolloverNathan ,

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

OneFJef ,

ELI5? I have seen this used once but not sure why this is better than flex and the corresponding centers.

Crow ,
@Crow@lemmy.world avatar

CSS grids are a godsend.

onlinepersona ,

Is this a new CSS attribute?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines