resize image css to fit display code example Example: resize img to fit img { max-width:100%; height:auto; }