CSS Input Button With IE 6 Input Button Hover

Posted on

Here is another bit of code I use at work. Yes there is an expression in it. Unfortunately, I don’t have control of the HTML and I can’t get stuff through QA if I ignore IE 6.

==
[css]
/**
* @section Buttons
*/
.btn,
.btn-hover {
background:#f5f5f5;
border:1px solid #888;
color:#565656;
font-family:“Lucida Grande”, Tahoma, Arial, Verdana, sans-serif;
font-size:12px;
font-weight:bold;
padding:.25em;
cursor:pointer;
}

.btn:hover,
.btn-hover {
background-color:#dff4ff;
border:1px solid #6299c5;
color:#336699;
}

/**
* Missing input hover
*
* @bugfix
* @affected IE6
* @valid no
* @cssdoc parsing off
*/
* html .btn {
m: expression(this.onmouseover = new Function(“this.className = ‘btn-hover’;”));
}
* html .btn:hover,
* html .btn-hover {
m: expression(this.onmouseout = new Function(“this.className = ‘btn’;”));
}
/* @cssdoc parsing on */

[/css]

References