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

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -