<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://mydrupalblog.lhmdesign.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>My Drupal Blog - Drupal 5.1 + PNG + IE6 - Comments</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6</link>
 <description>Comments for &quot;Drupal 5.1 + PNG + IE6&quot;</description>
 <language>en</language>
<item>
 <title>Has anyone solved the</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-11117</link>
 <description>&lt;p&gt;Has anyone solved the problem of IE6 requesting an image with the relative URL of &quot;none&quot; for every image that has &quot;background-image: none&quot; specified in the CSS?  This can cause an awful lot of 404 Not Found responses, which must slow down IE6&#039;s rendering of the page somewhat.&lt;/p&gt;
&lt;p&gt;Perhaps setting the property to &quot;none&quot; using javascript works, while using plain CSS doesn&#039;t?&lt;/p&gt;
&lt;p&gt;Is there any other way to tell IE6 to use no image, and not one called &quot;none&quot;, using CSS?&lt;/p&gt;
</description>
 <pubDate>Wed, 11 Jun 2008 10:04:02 -0700</pubDate>
 <dc:creator>Anthony Cartmell</dc:creator>
 <guid isPermaLink="false">comment 11117 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Nice tip, but realistically</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-10990</link>
 <description>&lt;p&gt;Nice tip, but realistically nothing new as this trick has been used for ages.&lt;br /&gt;
I still prefer the .htc trick as it can be applied to many (all) elements, VS an individual one. This allows you to use multiple CSS classes with PNG backgrounds. Although, still, no repeating backgrounds with PNG files.&lt;/p&gt;
&lt;p&gt;One suggestion is to replace &#039;/sites/all/themes/your_theme_name/&#039; with the php code: print base_path().path_to_theme();&lt;/p&gt;
</description>
 <pubDate>Wed, 28 May 2008 11:01:36 -0700</pubDate>
 <dc:creator>Yuriy</dc:creator>
 <guid isPermaLink="false">comment 10990 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Nice and interesting</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-10542</link>
 <description>&lt;p&gt;Nice and interesting article, thank u for the tipp!&lt;br /&gt;
btw- nice designed blog :-)&lt;/p&gt;
</description>
 <pubDate>Tue, 26 Feb 2008 20:28:28 -0700</pubDate>
 <dc:creator>Tobi</dc:creator>
 <guid isPermaLink="false">comment 10542 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Thanks for this really</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-10518</link>
 <description>&lt;p&gt;Thanks for this really useful article.Great cheat sheet, I appreciate it very much.&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Feb 2008 11:09:00 -0700</pubDate>
 <dc:creator>Dekoration</dc:creator>
 <guid isPermaLink="false">comment 10518 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>How about an src image</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-9359</link>
 <description>&lt;p&gt;How about an src image rather than background? I do hate IE6 but theres no other option to not deal with it. So lets fix it guys...&lt;/p&gt;
</description>
 <pubDate>Tue, 29 Jan 2008 23:48:05 -0700</pubDate>
 <dc:creator>Ivant</dc:creator>
 <guid isPermaLink="false">comment 9359 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>The ideal way would be to</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-8470</link>
 <description>&lt;p&gt;The ideal way would be to cut a small image (maybe 1px high) and then repeat it vertically. My solution was to just create a larger/extended .png file which covers the whole repeating area.&lt;/p&gt;
</description>
 <pubDate>Sun, 13 Jan 2008 23:35:12 -0700</pubDate>
 <dc:creator>Artikelverzeichnis</dc:creator>
 <guid isPermaLink="false">comment 8470 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>i agree with tom. IE must</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-7401</link>
 <description>&lt;p&gt;i agree with tom. IE must die. Exactly we must kill IE.&lt;/p&gt;
</description>
 <pubDate>Tue, 25 Dec 2007 11:04:01 -0700</pubDate>
 <dc:creator>palyaco</dc:creator>
 <guid isPermaLink="false">comment 7401 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Good god do I hate IE 6.0...</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-6763</link>
 <description>&lt;p&gt;Good god do I hate IE 6.0... thanks for this tutorial.&lt;/p&gt;
&lt;p&gt;IE 6.0 is the new Netscape btw.&lt;/p&gt;
</description>
 <pubDate>Sat, 17 Nov 2007 20:37:17 -0700</pubDate>
 <dc:creator>Spinn3r Web Crawler Boy</dc:creator>
 <guid isPermaLink="false">comment 6763 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>IE6 must die!</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-5040</link>
 <description>&lt;p&gt;IE6 must die!&lt;/p&gt;
</description>
 <pubDate>Wed, 19 Sep 2007 13:04:56 -0700</pubDate>
 <dc:creator>tom</dc:creator>
 <guid isPermaLink="false">comment 5040 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>For repeating backgrounds I</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-4236</link>
 <description>&lt;p&gt;For repeating backgrounds I think you need to specify either a width or a height argument.&lt;/p&gt;
&lt;p&gt;(height:100%; is normally best as... well... it does not seem to mean anything at all.)&lt;/p&gt;
</description>
 <pubDate>Sun, 09 Sep 2007 14:45:19 -0700</pubDate>
 <dc:creator>You</dc:creator>
 <guid isPermaLink="false">comment 4236 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Saving the PNG as Indexed</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-3354</link>
 <description>&lt;p&gt;Saving the PNG as Indexed color will give a transparency which works with IE although anti-alias and color pallet are some things which you&#039;ll need to work around. It&#039;s not an ideal solution -- quick and dirty. Works with IE 5.x.&lt;/p&gt;
</description>
 <pubDate>Wed, 08 Aug 2007 14:46:42 -0700</pubDate>
 <dc:creator>Chris Herberte</dc:creator>
 <guid isPermaLink="false">comment 3354 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Hello all,
@ salvis - you</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-3272</link>
 <description>&lt;p&gt;Hello all,&lt;/p&gt;
&lt;p&gt;@ salvis - you kind of answered your own question.  The Druplicon which Garland uses is a png but does not, as you said,  contain any transparency.  Each time you change the Garland color scheme it regenerates all the images necessary for the theme, including the logo.  The image for the logo is then just positioned so as to appear like there is transparency, when really there isn&#039;t.  If, for example, you were to reposition the logo you would see that the logo graphic doesn&#039;t line up with the header background gradient behind it.&lt;/p&gt;
&lt;p&gt;@ Jonathan - the simplest answer in your case might well be to achieve the effect you need by just cutting the logo image so that it also contains any background, and then position it, like the Garland logo, so that it appears as if the transparency exists when actually it does not.&lt;/p&gt;
&lt;p&gt;@Tom - if only a lot of people still didn&#039;t use IE6....one day perhaps.&lt;/p&gt;
</description>
 <pubDate>Thu, 02 Aug 2007 05:02:48 -0700</pubDate>
 <dc:creator>Laurence</dc:creator>
 <guid isPermaLink="false">comment 3272 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>But how does Drupal do it?</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-3262</link>
 <description>&lt;p&gt;But how does Drupal do it? In Garland the Druplicon&#039;s background looks transparent (at least you can freely change the colors of the background gradient with the Colors module), and it works perfectly under IE6.&lt;/p&gt;
&lt;p&gt;Surprisingly, themes/garland/logo.png has no transparency at all! As far as I can tell, Drupal can do it without resorting to IE-specific hacks, but how?&lt;/p&gt;
</description>
 <pubDate>Wed, 01 Aug 2007 05:57:06 -0700</pubDate>
 <dc:creator>salvis</dc:creator>
 <guid isPermaLink="false">comment 3262 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Darn. I thought this worked,</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-3241</link>
 <description>&lt;p&gt;Darn. I thought this worked, but I guess the javascript solution I did before was still in the cache. It&#039;s really only one image (site logo) I need to apply the filter to. Is there a direct way to do simply that?&lt;/p&gt;
</description>
 <pubDate>Mon, 30 Jul 2007 13:15:30 -0700</pubDate>
 <dc:creator>Jonathan</dc:creator>
 <guid isPermaLink="false">comment 3241 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Thanks for this. With what</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comment-3240</link>
 <description>&lt;p&gt;Thanks for this. With what little access I have to PCs running ie6, it appears to work.&lt;/p&gt;
&lt;p&gt;It was important to me to have a solution that did not involve javascript on the template page.&lt;/p&gt;
</description>
 <pubDate>Mon, 30 Jul 2007 11:59:05 -0700</pubDate>
 <dc:creator>Jonathan</dc:creator>
 <guid isPermaLink="false">comment 3240 at http://mydrupalblog.lhmdesign.com</guid>
</item>
<item>
 <title>Drupal 5.1 + PNG + IE6</title>
 <link>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6</link>
 <description>&lt;p&gt;Sounds like a fun recipe huh?  Well, having tried (and failed) previously to get this combination to work properly, I recently did some work for a client which demanded that .png files (Portable Network Graphic - image files which have transparent bits) were both used and looked correct in Internet Explorer 6.&lt;/p&gt;
&lt;p&gt;Basically, I wanted to accomplish four main things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I wanted a real .png file with full transparency to look correct in IE6, and behave as it’s supposed to (i.e. letting you see some or all of what’s beneath it).&lt;/li&gt;
&lt;li&gt;I wanted to achieve this using &lt;strong&gt;only&lt;/strong&gt; CSS – no Javascript, no PHP, no Flash, and no other trickery.&lt;/li&gt;
&lt;li&gt;I wanted this to work for background .png files, that is files which are called from the style.css file like so:&lt;br /&gt;
#div_1 {&lt;br /&gt;
background-image: url(images/druplicon.png)&lt;br /&gt;
}.&lt;/li&gt;
&lt;li&gt;I wanted the solution to be as tidy as possible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The trouble is that if you just try to load a .png into IE6 normally, you get the following outcome:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/files/blogimg/ie6ffpng.png&quot; alt=&quot;Firefox and IE6 .png comparison&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Ouch!&lt;/p&gt;
&lt;p&gt;After some googling around, and a bit of trial and error, I came up with a solution which satisfies all of the above criteria.  Here’s what I did:&lt;!--break--&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Firstly, I inserted the following code into my page.tpl.php file directly before the closing head tag:&lt;/p&gt;
&lt;p&gt;Remember to replace ‘your_theme_name’ with the actual name of your theme folder (e.g. &#039;garland&#039; or &#039;pushbutton&#039;).&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;&amp;lt;style type=&amp;quot;text/css&amp;quot; media=&amp;quot;all&amp;quot;&amp;gt;@import &amp;quot;/sites/all/themes/your_theme_name/ie6_fixes.css&amp;quot;;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;If your Drupal install is in a subfolder (e.g. www/garland) you may instead need to use:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;&amp;lt;style type=&amp;quot;text/css&amp;quot; media=&amp;quot;all&amp;quot;&amp;gt;@import &amp;quot;/your_theme_name/sites/all/themes/your_theme_name/ie6_fixes.css&amp;quot;;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;![endif]--&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;(which has an added ‘/your_theme_name’).&lt;/p&gt;
&lt;p&gt;This code targets IE6 &lt;em&gt;only&lt;/em&gt;, and tells it to load another stylesheet called ‘ie6_fixes.css’.  The beauty of the code is that it will be ignored by all other browsers, which means that we can provide IE6 with extra instructions about what to do with our .png files.  It also means that we can put our IE6 instructions in a separate file (ie6_fixes.css) and not clutter up our page.tpl.php file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Secondly, then, create the new CSS file. Give it a title of ‘ie6_fixes.css’, and save it to the root of your theme folder – i.e. the same place as your normal style.css file.  &lt;/p&gt;
&lt;p&gt;Now insert the following into your new ie6_fixes.css file.  Again, as with the previous step:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;replace ‘your_theme_name’ with the actual name of your theme folder, and also&lt;/li&gt;
&lt;li&gt;replace ‘#div_1’ with your own div id or class.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;(Line wraps marked »):&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#div_1 {&lt;br /&gt; background-image: none;&lt;br /&gt; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader »&lt;br /&gt;(src=&amp;#039;/sites/all/themes/your_theme_name/images/a_picture.png&amp;#039;, sizingMethod=&amp;#039;crop&amp;#039;);&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Again, as before, if your Drupal install is in a subfolder (e.g. www/garland) you may instead need to use:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#div_1 {&lt;br /&gt; background-image: none;&lt;br /&gt; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader »&lt;br /&gt;(src=&amp;#039;/your_theme_name/sites/all/themes/your_theme_name/images/a_picture.png&amp;#039;, sizingMethod=&amp;#039;crop&amp;#039;);&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And that’s it!  If we now look again at our .png file as viewed in IE6, the result is exactly as it should be.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/files/blogimg/ie6ffpng2.png&quot; alt=&quot;Firefox and IE6 .png comparison 2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A small caveat:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I haven’t been able to get this method to work with repeating backgrounds yet.  An obvious example would be if you wanted a shadow down either side of a centered design.  The ideal way would be to cut a small image (maybe 1px high) and then repeat it vertically.  My solution was to just create a larger/extended .png file which covers the whole repeating area.  Whilst this solution isn’t perfect, it’s certainly not terrible either.  Even though we are making a large (in dimensions) file, because it is mostly transparent the actual file size will remain relatively small, and it certainly looks a lot better than an IE6 mess!&lt;/p&gt;
</description>
 <comments>http://mydrupalblog.lhmdesign.com/drupal-5-1-png-ie6#comments</comments>
 <category domain="http://mydrupalblog.lhmdesign.com/topic/css">CSS</category>
 <category domain="http://mydrupalblog.lhmdesign.com/taxonomy/term/1">Drupal</category>
 <category domain="http://mydrupalblog.lhmdesign.com/topic/drupal-theming">Drupal Theming</category>
 <category domain="http://mydrupalblog.lhmdesign.com/topic/ie6">IE6</category>
 <category domain="http://mydrupalblog.lhmdesign.com/topic/page-tpl-php">page.tpl.php</category>
 <category domain="http://mydrupalblog.lhmdesign.com/topic/png">PNG</category>
 <pubDate>Mon, 09 Jul 2007 03:13:47 -0700</pubDate>
 <dc:creator>Laurence</dc:creator>
 <guid isPermaLink="false">27 at http://mydrupalblog.lhmdesign.com</guid>
</item>
</channel>
</rss>
