views:

16

answers:

0

I've got a bit of a problem with my asp.net mvc site in IE7. My web designer has included the following css to get a nice display in IE7:

.container          { background: #f2f2f2; border: 2px solid #ddd; padding: 12px; behavior: url(/devsite/Content/PIE.htc); 
                  -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }

Please note the behavior: url(/devsite/Content/PIE.htc) bit. This doesn't follow the standard url css behaviour of relative paths being relative to the style sheet. Relative paths in this case are to the page that called them. Between development, testing, graphics and production the site is deployed to a number of different virtual directories or no virtual directory at all. The above css is included in many files and it's a PITA, error prone and plays hell with version control to change this every time the code is deployed.

My questions are:

  1. Is there any cannonical way of solving this issue without resorting to code?
  2. Would it be possible to write an asp.net mvc 2 route that caught any references to PIE.htc and returned the file from a specific location?