center image in div and shrink to fit code example Example: make image stretch to fit div Just apply without any changing any code img { width: 100%; }