Otter@lemmy.ca to Programming@programming.devEnglish · 2 years agoCSS finally adds vertical centering in 2024build-your-own.orgexternal-linkmessage-square34fedilinkarrow-up1296arrow-down14cross-posted to: webdev@programming.dev
arrow-up1292arrow-down1external-linkCSS finally adds vertical centering in 2024build-your-own.orgOtter@lemmy.ca to Programming@programming.devEnglish · 2 years agomessage-square34fedilinkcross-posted to: webdev@programming.dev
minus-squarerefalo@programming.devlinkfedilinkarrow-up46arrow-down4·2 years agoIs it just me or is the irony lost on the author? It says “align-content: center” but it’s only vertically aligned…
minus-squarebitjunkie@lemmy.worldlinkfedilinkarrow-up15·2 years agoThat’s because under flexbox for horizontal alignment you use a different property called justify-content.
minus-squarerefalo@programming.devlinkfedilinkarrow-up4arrow-down2·2 years agoRight, which isn’t confusing at all /s
minus-squarebitjunkie@lemmy.worldlinkfedilinkarrow-up2·2 years agoThere’s a learning curve but it makes sense once you’ve used it for a bit. I recommend the frog game: https://flexboxfroggy.com/
minus-squarejol@discuss.tchncs.delinkfedilinkarrow-up8·2 years agoBecause we already have a way to center text horizontally…
minus-squarerefalo@programming.devlinkfedilinkarrow-up3·edit-22 years agoYes but my grief was with the naming… why not call it vertical-center? Just “center” is very confusing to me because it does not include horizontal.
minus-squarejol@discuss.tchncs.delinkfedilinkarrow-up2·2 years agoBecause of consistency with the rest of the box model
Is it just me or is the irony lost on the author? It says “align-content: center” but it’s only vertically aligned…
That’s because under flexbox for horizontal alignment you use a different property called
justify-content.Right, which isn’t confusing at all /s
There’s a learning curve but it makes sense once you’ve used it for a bit. I recommend the frog game: https://flexboxfroggy.com/
Because we already have a way to center text horizontally…
Yes but my grief was with the naming… why not call it vertical-center? Just “center” is very confusing to me because it does not include horizontal.
Because of consistency with the rest of the box model