I have a div that contains an image and text. If the text takes up only one line, I want the text to be vertically aligned to the center of the image. If the text takes up more then one line of text, I want the top of the text to be aligned with the top of the image.
Does CSS have a way of detecting when text wraps to the next line?