css how to make auto width for image with specific height code example Example: resize img to fit img { max-width:100%; height:auto; }