{"id":1594,"date":"2009-01-02T10:18:13","date_gmt":"2009-01-02T17:18:13","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=1594"},"modified":"2015-02-25T19:40:10","modified_gmt":"2015-02-26T02:40:10","slug":"32-using-the-unit-png-fix","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/video-screencasts\/32-using-the-unit-png-fix\/","title":{"rendered":"#32: Using the Unit PNG Fix"},"content":{"rendered":"
Designing using alpha-transparent PNGs makes life so much easier and cooler designs possible. As we are all painfully aware, IE 6 and under do not support them. They display… but any areas of alpha transparency get turned into nasty blue-gray and are anything but transparent. There is a way to force IE to respect the alpha transparency though, commonly referred to as the PNG hack. There are various methods, all boiling down to the use of a proprietary Microsoft CSS “filter”. A newcomer on the scene is the “Unit PNG Fix” which is ridiculously easy to use. Simply link up a very tiny JavaScript file in your header and you are done!<\/p>\n
Links from video:<\/strong>\t\t\t<\/p>\n Designing using alpha-transparent PNGs makes life so much easier and cooler designs possible. As we are all painfully aware, IE 6 and under do not support them. They display… but any areas of alpha transparency get turned into nasty blue-gray and are anything but transparent. There is a way to force IE to respect the […]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1283,"menu_order":0,"comment_status":"open","ping_status":"open","template":"video-single.php","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":""},"tags":[],"acf":[],"jetpack-related-posts":[{"id":333543,"url":"https:\/\/css-tricks.com\/almanac\/properties\/m\/mask-mode\/","url_meta":{"origin":1594,"position":0},"title":"mask-mode","date":"February 3, 2021","format":false,"excerpt":"The mask-mode CSS property indicates whether the CSS mask layer image is treated as an alpha mask or a luminance mask. .element { mask-image: url(sun.svg); mask-mode: alpha; } Syntax mask-mode: alpha | luminance | match-source The property accepts one keyword value, or a comma-separated list of two or all three\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/01\/s_ADCFB9F0494AC50BE88B2195592C05580BDEAAC4ECC0BBBFE6BE461D40F61FF7_1611418224888_alpha-mask-1.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":3730,"url":"https:\/\/css-tricks.com\/snippets\/css\/png-hack-for-ie-6\/","url_meta":{"origin":1594,"position":1},"title":"PNG Hack\/Fix for IE 6","date":"September 4, 2009","format":false,"excerpt":"For CSS background-images .yourselector { width:200px; height:100px; background: url(\/folder\/yourimage.png) no-repeat; _background:none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='\/folder\/yourimage.png',sizingMethod='crop'); } Cannot be used with repeating, needs fixed with and height. For inline HTML images img, .png { position: relative; behavior: expression((this.runtimeStyle.behavior=\"none\")&&(this.pngSet?this.pngSet=true:(this.nodeName == \"IMG\" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = \"none\", this.runtimeStyle.filter = \"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='\" + this.src + \"', sizingMethod='image')\", this.src =\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":335415,"url":"https:\/\/css-tricks.com\/almanac\/properties\/m\/mask-type\/","url_meta":{"origin":1594,"position":2},"title":"mask-type","date":"March 2, 2021","format":false,"excerpt":"The mask-type CSS property indicates whether the SVG \n