1

Hello i have this wordpress template that i got from someone, however i noticed that there are some errors in the style sheet file, i found this line in that file:

ul.gdlr-twitter-widget li:before{ font-size: 25px; line-height: 24px; float: left; margin-right: 20px;
    margin-top: 2px; font-family: FontAwesome; 
    content: '\f099'; *zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ''); }

Now this line is underlined in red in my IDE:

expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');

I'm average in CSS not really an expert so i am finding it difficult understanding what the above code does and how to fix it.

2
  • possible duplicate of CSS Expressions Commented Sep 3, 2015 at 12:12
  • Your expression should return a number or a percentage, not 2 javascript actions. So expression(0.5 + 0.5) is good but expression(doSomething, doSomething) is not Commented Sep 3, 2015 at 12:25

1 Answer 1

3

It's an IE 7 hack to emulate the the content property of the :before pseudo-element, because content is not supported before IE 8. If you don't care about IE 7, you can just remove this bit:

*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');

because all modern browsers will ignore that and pay attention to content: '\f099', which does the same thing, but properly.

If you do care about IE 7, you should probably just ignore the error.

More info: Can CSS Content Property work in IE7?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.