CSS finally adds vertical centering in 2024Otter@lemmy.ca to Programming@programming.dev – 324 points – 3 months agobuild-your-own.org72Post a CommentPreviewYou are viewing a single commentView all commentsIs 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 /sThere'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
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 /sThere'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
That's because under flexbox for horizontal alignment you use a different property called justify-content.Right, which isn't confusing at all /sThere's a learning curve but it makes sense once you've used it for a bit. I recommend the frog game: https://flexboxfroggy.com/
Right, which isn't confusing at all /sThere's a learning curve but it makes sense once you've used it for a bit. I recommend the frog game: https://flexboxfroggy.com/
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
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
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