2

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: expression(this.previousSibling==null?'0':'1px');
}
.nav {
  position: expression(runtimeStyle.position='relative');
}
Sampson
  • 265,109
  • 74
  • 539
  • 565

2 Answers2

2
ul.hmenu li {
margin-left:expression(this.previousSibling==null?'0':'1px');
}

This is equivalent to li { margin-left: 1px; } and li:first-child { margin-left: 0; }.

I don't see the point of the other expressions, other than to set the properties in an IE<9-only way.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
1

zoom: expression(runtimeStyle.zoom=1); is setting zoom:1 so you can achieve hasLayout

float: left !important; !important is supported in all browser and simply adds another layer of specificity to your declaration. i am quite positive that !important is not important in the above css...no pun intended :)

position: expression(runtimeStyle.position='relative');

runtimeStyle object represents the style of the object, which overrides the format and style specified in global style sheets, inline styles, as well as HTML attributes. in this case, on pageload, .nav's position is set to relative

albert
  • 8,112
  • 3
  • 47
  • 63