.extimg { max-width: 100%; } .extimg img { width: auto; height: auto; max-width: 100%; max-height: 100%; }