0

I'm trying to build a responsive website especially using a sprite split by 8 different images. I assume the usual way to make an image responsive is using css like below:

CSS:
  div {
     width: 25%;

 img {
    max-width:100%;
     }
}

But the issue is that I can't find a way to make my sprite responsive since the img is set as a background of a div and the adjustment is not set dynamically.

Sivounette
  • 55
  • 8
  • https://developer.mozilla.org/en-US/docs/Web/CSS/background-size – CBroe Nov 02 '14 at 17:15
  • There's still an issue with the height assuming an element with a background image/sprite will not adjust its height the same way a simple image could do. – Sivounette Nov 02 '14 at 17:41

0 Answers0