Cropper: Small container width results in huge container height

Created on 28 Jul 2015  路  2Comments  路  Source: fengyuanchen/cropper

Hey,

I have a cropper with a given width (25% of the screen). If i load an image that is wider than the width of the cropper, the height of the container is way too large. It seems that the width of the container is bounded, but the height is derived from original image.

This image shows the problem.
bad

This image shows the expected behaviour.
good

Best regards!

Most helpful comment

.img-container > img {
  max-width: 100%;
}

All 2 comments

.img-container > img {
  max-width: 100%;
}

thanks it worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghengeveld picture ghengeveld  路  3Comments

jzahka picture jzahka  路  4Comments

WillJW picture WillJW  路  3Comments

ThameDBA picture ThameDBA  路  4Comments

SimonBriche picture SimonBriche  路  7Comments