views:

355

answers:

1

How does do you auto resize a large image to fit a smaller width div container?


Example can be seen here on stackoverflow.com - when an image is inserted onto the editor panel and it is too large for display, the image is automatically resized.

+1  A: 

do not apply a width in the image tag. set your css to max-width:100%;

Also, read this http://unstoppablerobotninja.com/entry/fluid-images

Thorn007