views:

120

answers:

1

hello,

i am using whatever:hover (http://www.xs4all.nl/~peterned/csshover.html) script to mimic the :hover selector in IE6. the suggested use it to attach it to the body element as IE6 behavior. but all my pages use XHTML 1.1, so CSS validation in VS2008 fails when I try to publish my site, so publishing fails.

are there good ways to fix this?

thanks! konstantin

relevant markup:


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

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

metal-gear-solid
thanks. but it does not help. visual studio can read css files too :)
akonsu