Nishu Tayal
Nishu Tayal

Reputation: 20860

How to improve YSlow site performance grade for "Avoid CSS expressions"

I am checking the grade on Yslow. It returns me

**"Grade B on Avoid CSS expressions"**

There are a total of 2 expressions

   http://192.168.41.66/espritKM/esprit/public/CSS/fancybox/jquery.fancybox-1.3.4.css

How can i improve it?

Upvotes: 0

Views: 1523

Answers (1)

Karoly Horvath
Karoly Horvath

Reputation: 96266

Google is your friend:

Avoid CSS Expressions

One way to reduce the number of times your CSS expression is evaluated is to use one-time expressions, where the first time the expression is evaluated it sets the style property to an explicit value, which replaces the CSS expression. If the style property must be set dynamically throughout the life of the page, using event handlers instead of CSS expressions is an alternative approach. If you must use CSS expressions, remember that they may be evaluated thousands of times and could affect the performance of your page.

Upvotes: 1

Related Questions