When I attach vertical-align: middle to a DIV, I expect its contents to be vertically aligned. However, this is not what happens.
Many Stack Overflow threads exist about this seemingly odd behavior, but my question is different. Why was this CSS attribute implemented the way it was? Was it not meant to be a direct alternative to the deprecated valign tag?
vertical-alignseems to do the same as valign, as far as table-cells are concerned. (Additionally, it can be used on inline-elements to align them inside their line box.)So I guess it was meant to be, and is, a replacement of the deprecated
valign.Both being “the same”, I am unsure whether you misunderstand
valignor I misunderstand your question.