png backround images doesn't working in ie6, i am searching solution on this problem

Dani AI

Generated

and are on the right track. IE6 does not fully support PNG alpha channels, so you either need to provide a fallback or use an IE-specific fix. Below are practical, low-risk approaches you can apply now (sorted from simplest/most robust to more invasive).

  • Provide a fallback image (PNG8 or GIF) for IE6 using a small conditional stylesheet. This avoids hacks and gives predictable results for repeating backgrounds and sprites.
  • Use an IE-only stylesheet and the AlphaImageLoader filter when you absolutely need full-alpha PNGs. Keep in mind the filter does not support background-repeat well and can cause layout/performance quirks; only apply it to fixed-size elements.
  • Use a lightweight PNG-fix script/behavior if you want automated fixes across many elements — that saves manual work but adds client-side overhead.

A minimal example showing the conditional stylesheet + filter approach:

<!--[if lt IE 7]>
<link rel="stylesheet" href="/css/ie6.css" />
<![endif]-->
/* ie6.css */
.png-bg {
  background: none !important;
  filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/foo.png', sizingMethod='crop');
  width: 200px; height: 100px; /* ensure explicit size */
}

Quick troubleshooting tips: verify the image path, clear the browser cache, give the element explicit width/height, and avoid using the filter on repeated backgrounds. If your IE6 user base is tiny, consider graceful degradation instead of spending time on complex fixes.

Recommended Answers

All 2 Replies

Hey Guy!
Go there.. It will help your problem

IE6 .png support is problematic

png came after IE6 development

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.