how to get a imgage to fit perfectly html code example Example: resize img to fit img { max-width:100%; height:auto; }