antirek / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 1 forks source link

CSS & transparent pngs on different domain cause images to 404. #261

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Setup:
My site's (http://domain.com) javascript, css, and images are all on a 
subdomain (http://static.domain.com)

My CSS on http://static.domain.com has a couple of transparent background 
images, set with relative paths.

IE7.js's png fix forces IE to look for images on the current domain instead of 
the subdomain, which 404s and the images disappear.

What steps will reproduce the problem?
1. Add image-trans.png to root of http//static.domain.com/
2. Add style.css to root of http://static.domain.com/ with: "h1 { 
background-image:url(/image-trans.png); }"
3. Create index.html on http://domain.com, with link to 
http://static.domain.com/style.css stylesheet in head.

Image currently appears (images in css are relative to css path, not current 
url), but are not transparent in IE.

4. Add IE(7|8|9).js. Image disappears in IE, and instead points to 
http://domain.com/image-trans.png

What is the expected output? What do you see instead?
Expected: Images point to correct domain.
Instead: Images broken (404).

What version of the product are you using? On what operating system?
2.1b4

Please provide any additional information below.
A workaround would be to use fully qualified URLs in the style.css, but that 
would require maintaining multiple stylesheets during development, as well as 
breaking portability.

Original issue reported on code.google.com by billiamt...@gmail.com on 22 Jun 2010 at 8:59

GoogleCodeExporter commented 9 years ago
Also affects IE8.js using IE7

Original comment by ccarlcas...@gmail.com on 27 Apr 2011 at 2:37