Sound like you need to practice with some Flexbox Defense
incoming
Submitted 9 months ago by hairinmybellybutt@lemmy.world to programmer_humor@programming.dev
https://lemmy.world/pictrs/image/abb73b52-f4c1-42a6-aabf-3d6cfd07755c.jpeg
Comments
Muffi@programming.dev 9 months ago
Swiggles@lemmy.blahaj.zone 9 months ago
Now do html mail!
FooBarrington@lemmy.world 9 months ago
Swiggles@lemmy.blahaj.zone 9 months ago
That’s actually cool. I have to remember it next time I have to deal with html mail.
onlinepersona@programming.dev 9 months ago
Is this a new CSS attribute?
Knusper@feddit.de 9 months 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 `` layouts. 🙃<table></table>
adrian783@lemmy.world 9 months ago
grid and responsiveness are not antithetical. I mean the concept of grid had been around for like a decade, see bootstrap.
Knusper@feddit.de 9 months 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…
Potatos_are_not_friends@lemmy.world 9 months 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.
PoolloverNathan@programming.dev 9 months ago
It’s fine, my entire website is built on
trianglesgrids.
Scrappy@feddit.nl 9 months ago
I always redo flexboxfroggy.com whenever I touch flexbox again.
shira@feddit.de 9 months ago
Put it in another div, make that one display:flex;justify-content:center;
Crow@lemmy.world 9 months ago
CSS grids are a godsend.
simonced@lemmy.one 9 months ago
set
margin:auto
to your div, and call it a day, no need of flex/grid whatever…OneFJef@lemm.ee 9 months ago
ELI5? I have seen this used once but not sure why this is better than flex and the corresponding centers.
NorthWestWind@iusearchlinux.fyi 9 months ago
I prefer flex