So basically I am trying to reproduce the Twin Helix "IE PNG Fix v1.0
RC4" or more like to fine tune it to fit my needs.
The JS:
PngFix.Backgrounds = function() {
elements = $A(document.getElementsByTagName("*"));
elements.each(function(element) {
element = $(element);
if ((/\.png/i).test(element.getStyle("background-image"))) {
alert(element.getStyle("background-position"));
element.backroundImage = element.getStyle("background-
image").replace(/url\(\"/,"").replace(/\"\)/,"");
PngFix.Filter(element, element.backroundImage);
};
});
};
The HTML:
<div class="png" style="width: 200px; height: 200px;">
<p>Div Content</p>
</div>
The CSS (the same applies for shorthand as well):
.png {
background-repeat: no-repeat;
background-position: 10px 10px;
background-image: url("images/png1.png");
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---