Adjust Image Responsive to Screen Size
Make images dynamically resize with a changing screen size.
<img style="width:40%;" src="https://lage.us/images/Steve_Lage.jpg">
Example:
CSS:
The image needs to be in a container. The container size needs to be set. The image size needs to be set as a percent of the container.
1. Define the container size. In the example below the container is a div with min-width of 100px
2. To the image attribute add style="width:40%;" (or whatever percent you want).
Produces this result: Resize the grip on the container below to see the image resize with the container, staying at 50% of the changing container's size.
