.step-1-4 {
background:url('../images/gadget-4-sprite.png')
no-repeat; width:950px;
height:70px;
margin-left: 15px;
}
The code above sets the CSS for a div containing a background image. The dimensions of the div match that of the image, but when the window is resized smaller than the image width, it gets cropped.
Is there a way to style the CSS so the div resizes with the image inside? I attempted setting the width of the div to 100% which worked for resizing the div correctly, however the image did not resize along with it. If this approach isn't ideal, how can this be done using an <img>
tag instead?