Saran's Blog

Saran's Blog

Dynamic Image height adjustment in CSS based on content

Sep 4, 2019

Let say, we need an image and text content. The text has to overlay on the image. If the text content grows, the image height should also increase. The most common way of doing this is putting the image as a background-image in CSS. Similar to this ....

Dynamic Image height adjustment in CSS based on content