{"id":14132,"date":"2011-09-06T18:59:38","date_gmt":"2011-09-07T01:59:38","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14132"},"modified":"2020-02-29T06:47:16","modified_gmt":"2020-02-29T13:47:16","slug":"vertical-align","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/v\/vertical-align\/","title":{"rendered":"vertical-align"},"content":{"rendered":"

The vertical-align<\/code> property in CSS controls how elements set next to each other on a line are lined up. <\/p>\n

img {\r\n  vertical-align: middle;\r\n}<\/code><\/pre>\n

In order for this to work, the elements need to be set along a baseline. As in, inline<\/code> (e.g. <span><\/code>, <img><\/code>) or inline-block<\/code> (e.g. as set by the display<\/code><\/a> property) elements. <\/p>\n

The valid values are:<\/p>\n