/ Published in: CSS
Since there are still many people using IE6, we have to cater for them :-(
Anyway, this CSS statement shows a declaration for a PNG Logo. Most browsers will understand the first 5 lines. Sadly, IE6 will not be able to use the transparent PNG from line 4 and we override the background declaration by using the "_" at the beginning of line 7 (all other browsers ignore the "_"). Then we use the MS filter in lie 8 to insert the PNG image.
Anyway, this CSS statement shows a declaration for a PNG Logo. Most browsers will understand the first 5 lines. Sadly, IE6 will not be able to use the transparent PNG from line 4 and we override the background declaration by using the "_" at the beginning of line 7 (all other browsers ignore the "_"). Then we use the MS filter in lie 8 to insert the PNG image.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#Logo{ Width: 100px; Height: 100px; Background-Image: URL("Logo.png"); Background-Repeat: No-Repeat; /*---IE6 Only--*/ _Background-Image: URL(""); Filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Logo.png', sizingMethod='scale'); /*-/-IE6 Only--*/ }