html - Display image to proper portions -
hey have image beingness streamed s3, image can size super tiny huge.
i first set style auto, worked tiny images big ones overfilled div
<img style="width:auto; height:auto">
then tried doing width of 100% , big images filled properly, smaller images stretched out total width of div
<img style="width:100%">
is there proper way big images scaled size of div smaller images allowed display normally?
solution@dippas had right solution
<img style="max-width:100%; width:auto">
use max-width instead of width >>> max-width:100%
<img style="max-width:100%">
html css html5 css3
No comments:
Post a Comment