开发者

Validation (CSS 2.1): 'behavior' is not a known CSS property name

开发者 https://www.devze.com 2023-01-11 06:15 出处:网络
I am using the whatever:hover script to mimic the :hover selector in IE6. The suggested use is to attach it to the body element as an IE6 behavior. but all my pages use XHTML 1.1, so CSS validation in

I am using the whatever:hover script to mimic the :hover selector in IE6. The suggested use is to attach it to the body element as an IE6 behavior. but all my pages use XHTML 1.1, so CSS validation in VS2008 fails when I try to publish my site.

Are there good ways to fix this?

Th开发者_如何学Canks! konstantin

relevant markup:


    <!--[if IE 6]>
    <style type="text/css">
    body
    {
        behavior: url("../js/csshover3.htc");
    }
    </style>
    <![endif]-->


You can put

body
    {
        behavior: url("../js/csshover3.htc");
    }

in a external css

    <!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="ie6.css">
    <![endif]-->

Edit:

or you can disable css errors

http://geekswithblogs.net/SoftwareDoneRight/archive/2008/03/17/quicktip-turn-off-css-validation-errors.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消