I have a sprite image which is a contian of two images. But they are always bigger than the container, I want to fix/put them inside the parent container. How can I fit images without increasing parent size?

HTML:
Код: Выделить всё
Код: Выделить всё
.affiliate-sprite-60 { background:url('affiliate-sprite.jpg') 0px -1px; width:799px;height:440px; display:inline-block; } .affiliate-sprite-40 { background:url('affiliate-sprite.jpg') -799px -0px; width:783px;height:441px; display:inline-block; } div { width: 600px; border: 2px solid red; } 
Источник: https://stackoverflow.com/questions/781 ... -container
Мобильная версия