I have a div element whose height is set using em and whose width is set as a percentage. Inside there is an image. It has a percentage width (83%). However, if I am in resolution when this div element starts to narrow a bit, the image also narrows, but instead of capturing the entire div (as it should), the image just gets small and only appears at the top of the div. To compensate for this, I want to vertically align my image in a div element. How can i do this?
source share