fluid layout - Scale image with CSS but limit to orignial size -
for responsive design, scale down images:
img { width:100%; height:auto; }
this works expected, if width of screen exceeds original size of image, blows image.
is there way limit scaling original size? gets smaller if necessary?
thanks in advance answer.
willem
you use max-width
prevent image width becoming larger original size.
img { width: auto; max-width: 100%; height: auto; }
Comments
Post a Comment