Who just got owned? IE did.
By me.
This LJ now works in IE *WITH* png transparency and WITHOUT javascript. And it STILL works in compliant browsers too! Check it out.
I added a new div tag to the area in question and within that tag I put the old IE-only PNG handling code:
<div class=”logoimage”>
<img src=”http://www.makesitgood.net/images/blank.gif” width=”706″ height=”84″ style=”filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’http://www.makesitgood.net/images/logo.png’, sizingMethod=’scale’);” alt=”">
</div>
Then to make it work for netscape I edited my css file and used a CSS2 compliant identifier to get to that tag:
#pageHeader > .logoimage {
width: 706px;
height: 84px;
background: url(http://www.makesitgood.net/images/logo.png);
}
Since non-IE browsers will look at the IE image and just show blank.gif, it does work. I’ve got an extra image showing when I don’t need it, but I can live with it.
Since IE is non compliant with standards (or at the very least slow on the uptake) it won’t try to put the specified background image from the CSS on the page. So I end up with IE working, and no duplication on compliant browsers. I do however, end up downloading blank.gif unecessarily for good browsers, but eh, it’s small.


No Comments
» Leave one of your ownNo comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment