27

I'm using the Yahoo YUI libraries in a project. Can anyone help me understand the following CSS that I came across in the layout manager CSS:

I have been unable to figure out what the * (star) does to the declarations in the following CSS:

.yui-skin-sam .yui-layout .yui-layout-unit div.yui-layout-bd {
border:1px solid #808080;
border-bottom:none;
border-top:none;
*border-bottom-width:0;
*border-top-width:0;
background-color:#f2f2f2;
text-align:left;
}
Peter O.
  • 32,158
  • 14
  • 82
  • 96
Bill Caswell
  • 557
  • 1
  • 5
  • 15

2 Answers2

32

This is a hack to apply styles only to older versions of IE the * declared styles will override the new style elements , that are unsuported by Od IE only. http://en.wikipedia.org/wiki/CSS_filter#Star_hack

user9371102
  • 1,278
  • 3
  • 21
  • 43
Michael
  • 3,498
  • 5
  • 27
  • 32
3

The star exploits a bug in version 7 and below of Internet Explorer and is used to make IE render your markup correctly. More information here: http://www.ejeliot.com/blog/63

Hussein Abbas
  • 722
  • 6
  • 17