PDA

View Full Version : alternate version of site for IE6 to fix transparency issues?



electrickeye
20 Feb 2009, 07:33 PM
Hey all,

I was wondering if there's a way to use javascript to detect a person's browser and direct them to an alternate version of my site if theyre using ie6 or below. The site I'm building uses a lot of transparent png's that aren't supported in ie6, and using an alternate style sheet won't work because I can't switch out the pictures for alternates with css. I need a way to recreate the site with flattened jpgs that put everything together so it all looks transparent. Is this possible?

Wickham
21 Feb 2009, 03:06 AM
No need to use javascript, use a conditional comment:-

<!--[if lte ie 6]>
<link rel="stylesheet" href="ie6.css" title="IE6 styles" media="all" type="text/css">
<![endif]-->

put it AFTER the main stylesheet link in the head section so that it's processed last. lte means less than or equal to so it will only be used for IE6 and previous versions.