1

I'm trying add external mhtml resource to css. I have a css entry like this:

*background-image: url(mhtml:file://C:/folder/base64.mht!image1);
*background-image: url(mhtml:http://domain.com/base64.mht!image1);

works well, but I need to add base64.mht file as relative path. Is it possible?

PS. This is trick to add css with base64 images to IE browser: http://www.phpied.com/mhtml-when-you-need-data-uris-in-ie7-and-under/ Mayby is better way to add base64 images to css on IE7?

I will be grateful for any help. Marcin

Marcin Rogacki
  • 501
  • 6
  • 23

1 Answers1

0

Use an expression with document.location to reference a relative path:

background-image: expression("url(mhtml:" + document.location + "!polloloco)");
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265