Reputation: 41347
This may seem like a silly question, but I am not getting the expected results from vertical-align
. So…
Does vertical-align:center
center the child items of the item that has this property, or does it center the item itself that has this property, within its parent?
To me, “center” means the distances between the item’s top margin and the container’s top padding, and the item’s bottom margin and the container’s bottom padding are the same. This doesn’t seem to always be the case. Is the “bottom” of an inline element the baseline of the text?
Thanks!
Upvotes: 1
Views: 590
Reputation: 10848
Please take a look here: http://www.w3schools.com/css/pr_pos_vertical-align.asp
According to that, vertical-align:middle make the item itself in middle according to the parent.
Upvotes: 2