Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS background-size not working in IE7/8 [duplicate]

For some reason my background size is not working in IE 7&8. Can anyone tell me why. Also in the IE inspector, the background-size property is not showing up.

<a href="" class="twitter-custom-follow-button"></a>

.twitter-custom-follow-button {
  float: left;
  width: 96px;
  height: 20px;
  background: url(../img/slices/btns/twitter_follow.png);
  background-size: 96px 20px;
  background-repeat: no-repeat;
}
like image 875
Nealv Avatar asked Apr 02 '13 14:04

Nealv


2 Answers

That's because background-size is a CSS3 property which isn't supported before IE9.

However, there is a thread which suggests a possible workaround: How do I make background-size work in IE?

like image 142
dsgriffin Avatar answered Nov 12 '22 17:11

dsgriffin


IE 7/8 doesn't support the background-size property .. you will need to use javascript if you want the same functionality

like image 2
Adrift Avatar answered Nov 12 '22 16:11

Adrift