CSS by T. Afif :verified: on Nostr: Everyone is excited about the new align-content that works with block-level elements, ...
Everyone is excited about the new align-content that works with block-level elements, but pay attention when you want to center image, iframe, canvas, video, etc.
⚠️ They won't get centered ⚠️
They will look centered but in reality, they are not!
Images and similar inline-level elements have a white space under them due to the default baseline alignment, and that space is preserved when using align-content.
So don't forget to get rid of that space using vertical-align: top
#CSS #HTML
⚠️ They won't get centered ⚠️
They will look centered but in reality, they are not!
Images and similar inline-level elements have a white space under them due to the default baseline alignment, and that space is preserved when using align-content.
So don't forget to get rid of that space using vertical-align: top
#CSS #HTML