alpha transparency png support for IE...
Mike Lane
Registered Users Posts: 7,106 Major grins
I was browsing the smugmug default css and noticed that the filter: hack for alpha transparencies in IE was included in the css. Previously I had thought that this was part of an included script. So I have some questions.
First (this is a question that's been stewing for me not a part of the new hotness) whenever I have a png on my site (this one and my blog where I have the script to fix it ... i think, it's been too long) the image loads with a light blue background at first and then becomes transparent. That doesn't appear to be an issue for the smugmug pngs. How'd you do that or what am I doing wrong? I've researched it and can't come up with the answers really.
Second, I noticed that you have several classes with an attribute selector like this one:
.cart_add[class] {
background: url(/img/header/cart_add_black.png) no-repeat;
}
immediately following the previous class declaration with the filter: ie png hack (.cart_add {} in this case). Would this not do the same thing as .cart_add {background: url(...)} since the .cart_add is always going to be in an element with a class definition? Couldn't the .cart_add[class] {} styles be added into the .cart_add class? Is this a hack to hide the background: url(...) from IE?
Just trying to learn is all.
First (this is a question that's been stewing for me not a part of the new hotness) whenever I have a png on my site (this one and my blog where I have the script to fix it ... i think, it's been too long) the image loads with a light blue background at first and then becomes transparent. That doesn't appear to be an issue for the smugmug pngs. How'd you do that or what am I doing wrong? I've researched it and can't come up with the answers really.
Second, I noticed that you have several classes with an attribute selector like this one:
.cart_add[class] {
background: url(/img/header/cart_add_black.png) no-repeat;
}
immediately following the previous class declaration with the filter: ie png hack (.cart_add {} in this case). Would this not do the same thing as .cart_add {background: url(...)} since the .cart_add is always going to be in an element with a class definition? Couldn't the .cart_add[class] {} styles be added into the .cart_add class? Is this a hack to hide the background: url(...) from IE?
Just trying to learn is all.
0
Comments
For our new PNG files, we try to do inline transparency and it eliminates the flash. This makes the previous include file fix redundant, and we may be getting rid of it soon.
And to answer your second question, yes it is a hack to hide that definition from IE, since IE does not support psuedo selectors yet.
http://photos.mikelanestudios.com/