Relative Content

Tag Archive for cssvertical-alignment

Vertically align middle of image to full x-height of font

CSS has a vertical-align: middle property for inline elements, which vertically aligns the middle of the element to half of the x-height of the parent element’s font. However, this often puts images a little lower than I want them. Is there a way to vertically align the middle of an arbitrary image to the full x-height of the parent element’s font?