Business Advice and Help Forum for Businesses or Starting a Company in the UK - A1 Business Forums
corner image corner image
Member Box




corner image corner image
Our Advertisers

corner image corner image
Register FAQ Members List Today's Posts Search Today's Posts Mark Forums Read
A1 Business Blog Home
corner image corner image
A1businessforums.co.uk - The UK's Friendliest Online Business Community
Go Back   Business Forum UK - Advice Help and Questions - A1 Forums > Business Forums > Graphic Design, Web Design and Coding
Reload this Page

ie6 .png transparency

Designers Forum for Graphic, Logo or Print Design and Photography plus Website Design, Coding, Themes and Skins

Reply
corner image corner image
 
LinkBack Thread Tools Display Modes

corner image corner image
  #1 (permalink)  
Old 27-05-2008, 15:28
Case Case is offline
A1 is my Second Home!
 
Join Date: Apr 2008
Posts: 109
Thanks: 38
Thanked 10 Times in 10 Posts
Default ie6 .png transparency

Any fixes out there?

Particularly ones that fix the problem when you're setting transparent pngs in your CSS backgrounds.

Cheers
__________________

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
corner image corner image
Sponsored Links

Register to remove these ads
Case
View Public Profile
Send a private message to Case
Find all posts by Case
corner image corner image
  #2 (permalink)  
Old 27-05-2008, 15:35
freelancer's Avatar
freelancer freelancer is offline
Blog Entry: Whats going on at BGM
A1 is my Second Home!
 
Join Date: May 2008
Location: T'Yorkshire
Posts: 384
Thanks: 98
Thanked 40 Times in 39 Posts
http://www.twinhelix.com/css/iepngfix/

I use this one
__________________
Ben Gribbin Media - New look website
http://www.bengribbin.com


Work sample
AllEPC's @ all-epcs.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
corner image corner image
The Following 2 Users Say Thank You to freelancer For This Useful Post:
Case (27-05-2008), tommy (28-05-2008)
freelancer
View Public Profile
Send a private message to freelancer
Visit freelancer's homepage!
Find all posts by freelancer
corner image corner image
  #3 (permalink)  
Old 27-05-2008, 15:43
Case Case is offline
A1 is my Second Home!
 
Join Date: Apr 2008
Posts: 109
Thanks: 38
Thanked 10 Times in 10 Posts
Thanks, I'll give it a try.
__________________

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
Case
View Public Profile
Send a private message to Case
Find all posts by Case
corner image corner image
  #4 (permalink)  
Old 27-05-2008, 19:05
davewilkinson's Avatar
davewilkinson davewilkinson is offline
Blog Entry: Book meme
A1 Business Forum Regular
 
Join Date: May 2008
Location: Johannesburg for now; York in 2009
Posts: 54
Thanks: 4
Thanked 11 Times in 11 Posts
I've used the twinhelix solution on a couple of sites and so far I haven't experienced any problems. There was also a very comprehensive article on Alistapart a couple of years ago but I can't seem to find the link.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
corner image corner image
The Following User Says Thank You to davewilkinson For This Useful Post:
Case (27-05-2008)
davewilkinson
View Public Profile
Send a private message to davewilkinson
Visit davewilkinson's homepage!
Find all posts by davewilkinson
corner image corner image
  #5 (permalink)  
Old 27-05-2008, 20:08
Tjobbe Tjobbe is offline
I'm Getting to Know A1
 
Join Date: May 2008
Location: Byfield
Posts: 30
Thanks: 0
Thanked 5 Times in 5 Posts
I use an ie6 only stylesheet for the recent problems I encountered, maybe this is of use, view source here: holiday-cottage-cotswolds (.co.uk)

note the:
HTML Code:
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="css/ie6.css" />
<![endif]-->
Conditional comment in the header.
__________________
Craftsman Web Design
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
Tjobbe
View Public Profile
Send a private message to Tjobbe
Visit Tjobbe's homepage!
Find all posts by Tjobbe
corner image corner image
  #6 (permalink)  
Old 27-05-2008, 21:12
tommy's Avatar
tommy tommy is offline
Blog Entry: IE6 Issue fixed for 3 column layout seo (search...
A1 is my Second Home!
 
Join Date: Mar 2008
Location: Essex
Posts: 376
Thanks: 45
Thanked 97 Times in 85 Posts
I use this very small javascript function which works a treat.

http://homepage.ntlworld.com/bobosola/index.htm
__________________
Townhouse holiday home to rent in La Zenia, south of Torrevieja
HTML Source - for all your XHTML & CSS needs
DVD's | DVD Players | HD TV's | Home Cinema - all under one site

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
tommy
View Public Profile
Send a private message to tommy
Visit tommy's homepage!
Find all posts by tommy
corner image corner image
  #7 (permalink)  
Old 28-05-2008, 16:30
freelancer's Avatar
freelancer freelancer is offline
Blog Entry: Whats going on at BGM
A1 is my Second Home!
 
Join Date: May 2008
Location: T'Yorkshire
Posts: 384
Thanks: 98
Thanked 40 Times in 39 Posts
Quote:
Originally Posted by tommy View Post
I use this very small javascript function which works a treat.

http://homepage.ntlworld.com/bobosola/index.htm
I used to use this Tom, but it doesnt work on CSS backgrounds whereas mine does. It also works on animated (via javascript frameworks like mootools) images too
__________________
Ben Gribbin Media - New look website
http://www.bengribbin.com


Work sample
AllEPC's @ all-epcs.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
freelancer
View Public Profile
Send a private message to freelancer
Visit freelancer's homepage!
Find all posts by freelancer
corner image corner image
  #8 (permalink)  
Old 28-05-2008, 16:37
tommy's Avatar
tommy tommy is offline
Blog Entry: IE6 Issue fixed for 3 column layout seo (search...
A1 is my Second Home!
 
Join Date: Mar 2008
Location: Essex
Posts: 376
Thanks: 45
Thanked 97 Times in 85 Posts
Quote:
Originally Posted by freelancer View Post
I used to use this Tom, but it doesnt work on CSS backgrounds whereas mine does. It also works on animated (via javascript frameworks like mootools) images too
I guess as I have never really had a requirement for transparency on background images, I have not run into this problem before.

Thanks for the heads up Ben.
__________________
Townhouse holiday home to rent in La Zenia, south of Torrevieja
HTML Source - for all your XHTML & CSS needs
DVD's | DVD Players | HD TV's | Home Cinema - all under one site

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
tommy
View Public Profile
Send a private message to tommy
Visit tommy's homepage!
Find all posts by tommy
corner image corner image
  #9 (permalink)  
Old 28-05-2008, 16:59
freelancer's Avatar
freelancer freelancer is offline
Blog Entry: Whats going on at BGM
A1 is my Second Home!
 
Join Date: May 2008
Location: T'Yorkshire
Posts: 384
Thanks: 98
Thanked 40 Times in 39 Posts
Quote:
Originally Posted by tommy View Post
I guess as I have never really had a requirement for transparency on background images, I have not run into this problem before.

Thanks for the heads up Ben.
no probs
__________________
Ben Gribbin Media - New look website
http://www.bengribbin.com


Work sample
AllEPC's @ all-epcs.co.uk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
freelancer
View Public Profile
Send a private message to freelancer
Visit freelancer's homepage!
Find all posts by freelancer
corner image corner image
  #10 (permalink)  
Old 04-06-2008, 01:51
Chameleon Chameleon is offline
UKSBF Convert
 
Join Date: May 2008
Posts: 16
Thanks: 0
Thanked 2 Times in 2 Posts
Create a file called ie6pngfix.htc and keep it in your css folder. Simply call it and put the following code in the ie6pngfix.htc file. It works for IE 5.5 and above.

Code:
<public:component>
<public:attach event="onpropertychange" onevent="doFix()" />

<script type="text/javascript">

// This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'images/blank.png';


var f = 'DXImageTransform.Microsoft.AlphaImageLoader';

function filt(s, m)
{
 if (filters[f])
 {
  filters[f].enabled = s ? true : false;
  if (s) with (filters[f]) { src = s; sizingMethod = m }
 }
 else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}

function doFix()
{
 // Assume IE7 is OK.
 if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
  (event && !/(background|src)/.test(event.propertyName))) return;

 var bgImg = currentStyle.backgroundImage || style.backgroundImage;

 if (tagName == 'IMG')
 {
  if ((/\.png$/i).test(src))
  {
   if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
    style.width = offsetWidth + 'px';
   filt(src, 'crop');
   src = blankImg;
  }
  else if (src.indexOf(blankImg) < 0) filt();
 }
 else if (bgImg && bgImg != 'none')
 {
  if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
  {
   var s = RegExp.$1;
   if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
    style.width = offsetWidth + 'px';
   style.backgroundImage = 'none';
   filt(s, 'crop');
   // IE link fix.
   for (var n = 0; n < childNodes.length; n++)
    if (childNodes[n].style) childNodes[n].style.position = 'relative';
  }
  else filt();
 }
}

doFix();

</script>
</public:component>
__________________
Chameleon Webhosting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookStumble this Post!Google Bookmark this Post!
Reply With Quote
Chameleon
View Public Profile
Send a private message to Chameleon
Visit Chameleon's homepage!
Find all posts by Chameleon
Reply

« Promo Boxes | Is there a »

corner image corner image
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page
Display Modes
Linear Mode Linear Mode
Hybrid Mode Switch to Hybrid Mode
Threaded Mode Switch to Threaded Mode

corner image corner image
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 23:59.


Calendar - Contact Us - A1 Business Forum UK - Archive - Top

© A1 Business Forums 2008

A1 Business Forums is a brand of Pixel Mind Ltd, a company registered in England and Wales with company number 06693709

Pixelcraze
Forum theme a Pixelcraze Creation





LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!
Share on Facebook Share on Facebook
Stumble this Thread Stumble this Thread
Google Bookmark this Thread Google Bookmark this Thread