tags:

views:

237

answers:

3

Hi bit of a silly question.

Are there any png transparency issues with backgrounds to submit buttons or inputs of type image? Or do they behave fine just like img tags with a png image as the source.

I understand for IE6 you need a hack for png transparency to work.

A: 

Yes, if you have png files and you are under IE6, you will witness such problems. But there are solutions too; one being as follows:

http://jquery.andreaseberhard.de/pngFix/

By the way there is no need to use png for input type buttons, etc unless you really need it.

Sarfraz
A: 

Another issue is metadata which can be contained in png file. If png contains it, then in IE browsers you'll see a bit different colors.

It can be fixed easily. You just need to save your png correctly (disable metadata).

Roman
A: 

I ran into this issue recently and converted the button images to Gif. There is a minor loss of fidelity, as you have to get by with 256 colors, but transparency works without any hacks.

cdonner