0

I have a div, and I want to make a whole background image fit inside the div, even though the image is a little bigger than the div, how would I go about shrinking this dynamically?

anthonypliu
  • 12,179
  • 28
  • 92
  • 154
  • Duplicate : http://stackoverflow.com/questions/376253/stretch-and-scale-css-background – rlb.usa Jul 26 '10 at 21:12
  • You can't do that with CSS only. It's not for image processing. To do that you need to use a script, server-side(PHP,JSP,etc) or Javascript. – Ventus Jul 26 '10 at 21:12

1 Answers1

1

Looks like it is possible in CSS3 but not currently in CSS2

http://www.w3.org/TR/2002/WD-css3-background-20020802/#background-size

This is also a duplicate of this question

Community
  • 1
  • 1
David Young
  • 4,643
  • 2
  • 21
  • 18