1img {
2 display: block;
3 max-width: 100%;
4 max-height: 100%;
5 width: auto;
6 height: auto;
7}
1.image-full {
2 background: url(...some image...) no-repeat;
3 background-size: cover;
4 background-position: center center;
5}
6
1Don't set height AND width. Use one or the other and the correct aspect ratio will be maintained.