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?
2
  • Hi, please update the post if you have solved your problem, I am also in need of this. Thanks Commented Feb 1, 2011 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. Commented Feb 3, 2011 at 12:02

2 Answers 2

2

The solution below worked for me:

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

Sign up to request clarification or add additional context in comments.

Comments

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>');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.