CSS expressions were introduced in Internet Explorer 5.0 to allow a JavaScript expression to be assigned to a CSS property. They are no longer supported as of Internet Explorer 8.0.
Questions tagged [css-expressions]
26 questions
55
votes
3 answers
CSS Expressions
I read somewhere that CSS Expressions were deprecated and shouldn't even be used. I had never heard of them and decided to take a look. I found a code example that kept a floating element in the same spot on the screen, even if you…

Freesnöw
- 30,619
- 30
- 89
- 138
9
votes
6 answers
Can !important rules be used in IE's CSS expressions?
Firstly, I know that CSS expressions are defunct and wrong in so many ways, and also to avoid using !important where possible. This is for a special case stylesheet.
In Short
My question is... Is there any way for a CSS expression to set the…

Prem
- 15,911
- 11
- 31
- 35
6
votes
3 answers
Which browsers still support CSS expressions
From a blog:
The basic idea with CSS expressions is
that you will have calculation and
dynamic values for properties in the
CSS code, something that people have
found very useful. A simple example
can be implementing max-width behavior
…

vinny
- 346
- 3
- 7
4
votes
8 answers
IE6 performance with CSS expressions
We are developing a web application that will be sold to many clients. There is already one client (a bank) which has decided that it will buy the product once it is ready. Unfortunately due to some miscommunication it came out rather late that the…

Vilx-
- 104,512
- 87
- 279
- 422
4
votes
2 answers
Remove wrapper div from rails hidden fields
I was wondering if it's somehow possible to remove the wrapper div from Rails hidden inputs that are automatically generated on forms?
The reason is that it's giving me a 'B' on my ySlow report and telling me to avoid CSS expressions. I know this…

anthony
- 391
- 1
- 3
- 15
3
votes
2 answers
CSS expression to set height of div
I want to set the height of a div based on CSS expression.
Basically it should be set as some % (say 90%) of the viewport width
I tried the following, but is not working;
height:expression(document.documentElement.clientWidth ?…

copenndthagen
- 49,230
- 102
- 290
- 442
3
votes
2 answers
Css Expression not working in IE11
We developed a application with older Version of IE7.
And the code contains "CSS expression" but this not working in IE11.
Sample code :
div#GridViewContainer
{
position: relative !important;
width: 1000px…

Arunraj
- 113
- 1
- 3
- 6
3
votes
1 answer
Ignoring CSS Expressions in Eclipse/Aptana
I'm working on some old CSS which has some hacks, specifically CSS expressions, built in for various versions of IE. Thanks to these hacks I get a mountain of CSS syntax errors and I'm trying to ignore them.
In the CSS Syntax Validator I've tried…

Mike Cluck
- 31,869
- 13
- 80
- 91
2
votes
2 answers
IE6 css hacks and their standard css equivalence?
in the following there are some IE6 css hacks I need their standard equivalence.
.header {
zoom: expression(runtimeStyle.zoom=1);
z-index: 1;
}
.hmenu ul li {
float: left !important;
}
ul.hmenu li {
margin-left:…

Hamid Leader
- 31
- 1
2
votes
2 answers
CSS - How to do a: "ONE-TIME CSS EXPRESSION" in css? (e.g. max-height / max-width for IE)
I usually solve my programming doubts before I fantasize to make a question in SO, but this is the first time I can't seem to find the answer....so...here it goes my first question to the site after hours of trying to solve this:
¿How to have a…

Edward
- 615
- 1
- 5
- 12
2
votes
3 answers
CSS expressions or javascript?
I wonder whether it makes sense to use CSS expressions if you can just use javascript.
Which would be a better or faster?
Do CSS expressions work with disabled js?

Vitaly Batonov
- 1,112
- 3
- 12
- 21
2
votes
2 answers
CSS expressions vs Filters and Javascript for internet explorer
What is the difference between CSS expressions and CSS Filters?
Are both bad for page speed?
If something can be achieved in pure CSS in other browsers but for IE only possible by CSS expressions or CSS Filters or Javascript. Then should we always…

Jitendra Vyas
- 148,487
- 229
- 573
- 852
2
votes
3 answers
How to Replace CSS Expressions
I have an old ASP web application for Time Sheet entry which is riddled with CSS expressions. They appear in the CSS file:
.ApptPage {
position : relative;
height :…

zam664
- 757
- 1
- 7
- 18
2
votes
5 answers
Best way to center align a div with unknown width and height?
Say I have a div on my page as:
My CSS looks something like:
.center{
background:red;
position:absolute;
left:50%;
top:50%;
margin-left: ?
margin-top: ?
}
So as you can see above, the only thing…

copenndthagen
- 49,230
- 102
- 290
- 442
1
vote
1 answer
css expression causes less error
I'm using LESS and I have to write this code
*zoom: expression(
this.runtimeStyle.zoom="1",
this.insertBefore(
document.createElement("div"),
this.childNodes[0]
).className="before",
this.appendChild(
…

user3852961
- 83
- 8