How to vertically align both image and text in a DIV using CSS?
Give both the image and the text a vertical-align: middle – the text needs to be contained in an element that is also display: inline. So markup like this: <div> <span><img src=”https://stackoverflow.com/questions/13408394/blah.jpg” /></span> <span>text text text</span> </div> div { display: table; } img { vertical-align: middle; display: table-cell; } span { vertical-align: middle; display: table-cell; … Read more