1

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?
Jason Berkan
  • 8,734
  • 7
  • 29
  • 39
Giles Roberts
  • 6,407
  • 6
  • 48
  • 63
  • Hi, please update the post if you have solved your problem, I am also in need of this. Thanks – Aivan Monceller Feb 01 '11 at 16:17
  • @Avian Monceller. Haven't come up with a solution to this specific problem. We ended up using background images for the elements that absolutely needed to be rounded and for the others simply accepted square corners in IE. – Giles Roberts Feb 03 '11 at 12:02

2 Answers2

2

The solution below worked for me:

css3pie in MVC, where to place the pie.htc file?

Community
  • 1
  • 1
jmotes
  • 2,669
  • 2
  • 22
  • 19
1

On the PIE forum which deals with relative positioning for an ASP.Net site which you might find useful, the link http://css3pie.com/forum/viewtopic.php?f=4&t=97

and not sure if this will help but found a posting here http://www.kevinlabranche.com/blog/default,month,2010-09.aspx

which included the expression below in css to the relative position of PIE.htc

behavior: url('./Scripts/<SPAN class=searchword>PIE.htc</SPAN>');
eslsys
  • 363
  • 3
  • 14