/    Sign up×
Community /Pin to ProfileBookmark

yet another IE6 png issue :(

Hey guys

As almost all of you know transparent png files dont work in IE5 or IE6.

I know there is a few ways to fix the problem via using javascripts and other similar ways.

But does anyone know if there is a script around that will disable the png files from showing or loading just for ie5 and 6, that wont effect any other browser?

Instead just ether show the background image or load up another image

If you get what i mean…

Javascript is way above my head. 😮

Thanks guys
Alex

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorMay 22.2009 — In fact you may use transparent PNG ([I]as 24 bits![/I]) in IE6 as well. The solution is simple. Use PNG files as [I]CSS backgrounds[/I] and create a [I]separate CSS file for IE6[/I]
<i>
</i>&lt;link href="css/css.css" rel="stylesheet" type="text/css"&gt;
&lt;!--[if lte IE 6]&gt;
&lt;link href="css/ie6fix.css" rel="stylesheet" type="text/css"&gt;
&lt;![endif]--&gt;

Suppose in your css.css you have this class:
<i>
</i>.mypng{
width:100px;
height:50px;
background:url(../img/mypng.png) no-repeat 0 0;
}

the fix for IE6 would be, in the file ie6fix.css, like this :
<i>
</i>.mypng{
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale, src='img/mypng.png');
background:none;
}

Do the same for all the PNG's you want to use.

Make sure you place the ie6fix link href [I]below[/I] the normal css link href, in the HEAD codes.

Quite simple, right? ?
×

Success!

Help @slobodian spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...