0

I've a 200x200 px div in which I put a background-image. The div is resizable and keep ratio.

In recent browsers, "background-size: cover;" or "background-size: contain;" works fine but under IE7, it doesn't work.

Does anybody have a suggestion / trick to fix that ?

Thank you very much in advance.

Zorkzyd
  • 929
  • 3
  • 12
  • 30
  • There was another thread a while back... http://stackoverflow.com/questions/5895571/css-background-size-cover-in-internet-explorer-7 – ncf May 30 '12 at 21:08

2 Answers2

0

If the image is smaller than the div could you not repeat it using the following CSS?

{
background-image:url('bg.gif');
background-repeat:repeat-y;
}

If not, could you please provide a link to the deployed code.

Phil Hudson
  • 3,819
  • 8
  • 35
  • 59
  • I found a solution in CSS. In fact, my background-image is just two red guidelines. Somebody suggests me to do that with CSS only without image. It's easier to code that and it's cross-browsers ! I should have thought of it ! – Zorkzyd May 31 '12 at 11:56
0

Try jQThumb. It was built to fix background-size issue in IE6, IE7, and IE8

P.C.
  • 3,751
  • 2
  • 18
  • 17