February 24, 201214 yr Hi All, I'm having a little problem with an img... as we know ie6 does not show transparent pngs without hacks... im trying to go hack free and use valid markup... My logo is a png... works fine in every browser, only ie6 and down is the problem... i have a conditional css sheet targeting ie6 My markup is this: <div id="logo"> <a href="index.html"><img src="images/global/logo.png" width="138" height="156" alt="" /></a> </div><!-- /logo --> As you can see the img is inline and not a background img... how can i deliver a jpg of the img to ie? so i want to take away the png, then replace it with the jpg... i know i can do it as a background img in the css but is there an inline way to do it? thanks Edited February 24, 201214 yr by Renaissance-Design Please use the code button or tags to format your code.
February 24, 201214 yr Author Oh and one other thing... I did not really want to use an empty div on this... so thats why im looking for other options than the css background-img thanks
February 24, 201214 yr You are allowed to use conditional comments in the body markup, although it should be the minimum. This works in IE9 and Firefox and should work in IE6 although I haven't tested IE6. There's a different image for non-IE browsers, IE greater than IE6, and IE6. <![if !IE]><img src="raindroplets.jpg" alt="Raindroplets" /><![endif]> <!--NOT IE browsers--> <!--[if gt IE 6]><img src="100x100orange.jpg" alt="Orange " /><!endif]--> <!--IE greater than IE6--> <!--[if IE 6]><img src="100x100pxsquare_a.jpg" alt="Square A" /><![endif]--> Javascript is the normal method of dealing with png images in IE6. Edited February 24, 201214 yr by Wickham
February 24, 201214 yr Author thanks both, ive gone with the java one from might pirate though... works like a charm...
Create an account or sign in to comment