<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Labs &#187; CSS</title>
	<atom:link href="http://labs.iamkoa.net/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.iamkoa.net</link>
	<description>I break it. I fix it. You learn.</description>
	<lastBuildDate>Fri, 09 Jul 2010 02:26:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CSS &amp; JS Coding Standards / Organization [OOP]</title>
		<link>http://labs.iamkoa.net/2010/07/01/css-js-coding-standards-organization-oop/</link>
		<comments>http://labs.iamkoa.net/2010/07/01/css-js-coding-standards-organization-oop/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 23:55:43 +0000</pubDate>
		<dc:creator>Koa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://labs.iamkoa.net/?p=296</guid>
		<description><![CDATA[By no means should this article serve as the bible of CSS &#038; JS coding standards, though it should get the ball rolling for those who are unsure where to start. Over the years, I&#8217;ve had the privilege of working with many talented developers, each of whom have left little bits and pieces of their [...]]]></description>
			<content:encoded><![CDATA[<p>By no means should this article serve as the bible of CSS &#038; JS coding standards, though it should get the ball rolling for those who are unsure where to start. Over the years, I&#8217;ve had the privilege of working with many talented developers, each of whom have left little bits and pieces of their coding style behind. From those pieces I&#8217;ve assembled this article.</p>
<p>Let&#8217;s begin&#8230;</p>
<h2>Alphabetize Your Code</h2>
<p>Alphabetizing your code is an extra organizational step often overlooked. It&#8217;s especially helpful in PHP classes containing getter and setter functions, but it also comes in handy for CSS and JS. Often times similarly named elements will be somewhat related in function, so clustering them together makes them easier to find.</p>
<p>I&#8217;d recommend alphabetizing everything from JS class and function names, to CSS classes and ID&#8217;s. You&#8217;ll notice that every code example in this article is alphabetized to further exemplify the point.</p>
<p><span id="more-296"></span></p>
<hr />
<h2>Comment Everything</h2>
<p>Comments are essential, especially among devs working in groups. The styles seem to vary slightly from person to person, but the theme is the same &#8211; you can never comment too much.</p>
<p>Here is my commenting style for JS / PHP:</p>
<pre class="brush:js">
/******************************************************
 * Cart.class.js
 *
 * A class of JS functions associated with the
 * tasks performed by the shopping cart.
 * @author Koa Metter em@mail.com
 * @copyright Copyright (c) 2010, Company
 ******************************************************/
var Cart = {

    // ...

    /**
     * Add item to cart
     * @param string item_id
     * @param string item_quantity
     * @todo Check for string validity
     */
    addCartItem: function (item_id, item_quantity)
    {
        if (!Utilities.isEmpty($('#cart-items')))
		{
			Cart.AJAX({
				data: 'call=addOfferingToCart&#038;args[0]='+item_id+'&#038;args[1]='+item_quantity,

				// Things we'd like to do upon 'status => success' ajax response
				success: function (msg)
				{
					Cart.displayNewCartItem(msg);

					// Update cart total price
					Cart.displayCartTotal();

					// Also update checkout rebilling terms!
					if (msg.response.rebilling_terms_agreement){
						$('#billing-terms-agreement-label').html(msg.response.rebilling_terms_agreement);
					}

					Cart.proceedBtnCheck();
				}
			});
		}
    }

}
</pre>
<p>When commenting in PHP, <a href="http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.pkg.html">phpDocumentor</a> can be used to build a comprehensive dev manual for your source code. I use the same documentation style for JS simply because I come from a PHP background.</p>
<p>Though CSS doesn&#8217;t need the phpDocumentor-type of commenting, it should nevertheless remain detailed to explain the elements and their purpose. Clustering elements that are related to the same stylistic area or function of the website helps in organizing without the need of many comment blocks.</p>
<hr />
<h2>Indent CSS</h2>
<p>Indenting your code is an obvious standard with most programing languages, but often times CSS is left out of the loop. Indent a CSS element if it&#8217;s a child of a parent element, like so:</p>
<pre class="brush:css">
#container {
    color:#222;
    width:100%;
    z-index:1;
}

    #container .lg-block {
        height:300px;
    }

    #container .sm-block {
        height:100px;
    }

.etc {
    /* ... */
}
</pre>
<p>The above CSS example shows that the class <code>.lg-block</code> is specifically contained within the ID <code>#container</code>, thus we are indenting it to visually represent the same thing.</p>
<hr />
<h2>OOP-ish Javascript</h2>
<p>This topic deviates slightly from actual &#8220;coding standards&#8221;, but I think it&#8217;s equally important &#8211; how to format your JS into usable, organized classes. This rule takes into account all other coding standards (alphabetization, indentation, commenting, etc) and applies them to JS, adding in OOP-like objects.</p>
<p>Here&#8217;s an example:</p>
<pre class="brush:js">
var Vehicles = {
    /*
     * Give us the word "Bus"
     * @return string
     */
    bus: function ()
    {
        return 'Bus';
    },

    /*
     * Give us the word "Car"
     * @return string
     */
    car: function ()
    {
        return 'Car.';
    },

    /*
     * Give both car() and truck()
     * @return string
     */
    getCarAndTruck: function ()
    {
        return this.car + ' and ' + this.truck;
    },

    /*
     * Give us the word "Truck"
     * @return string
     */
    truck: function()
    {
        return 'Truck.';
    }
}

// Let's call the function getCarAndTruck like so:
Vehicles.getCarAndTruck();
</pre>
<p>Shuffling your JS into objects helps associate functions with tasks / groups and thus creates a more organized codebase.</p>
<hr />
<p>Hopefully this helps. If you have a different method of commenting and/or organizing your CSS or JS code, let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.iamkoa.net/2010/07/01/css-js-coding-standards-organization-oop/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Websites Dedicated To Design Inspiration: Web Showcasing, Typography, Digital Art</title>
		<link>http://labs.iamkoa.net/2008/02/13/websites-dedicated-to-design-inspiration-web-showcasing-typography-digital-art/</link>
		<comments>http://labs.iamkoa.net/2008/02/13/websites-dedicated-to-design-inspiration-web-showcasing-typography-digital-art/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 06:47:07 +0000</pubDate>
		<dc:creator>Koa</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[beauty]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://labs.iamkoa.net/2008/02/13/websites-dedicated-to-design-inspiration-web-showcasing-typography-digital-art/</guid>
		<description><![CDATA[Personally speaking, preparing a new web design isn&#8217;t as simple as opening Photoshop. I need constant influence from many creative sources to keep my mind fresh on what&#8217;s hot and what&#8217;s not. When I need inspirational eye-candy, my sources include CSS galleries, digital prints, and typography demonstrations. For those who have similar inspirational needs, allow [...]]]></description>
			<content:encoded><![CDATA[<p>Personally speaking, preparing a new web design isn&#8217;t as simple as opening Photoshop. I need constant influence from many creative sources to keep my mind fresh on what&#8217;s hot and what&#8217;s not. When I need inspirational eye-candy, my sources include CSS galleries, digital prints, and typography demonstrations.</p>
<p>For those who have similar inspirational needs, allow me to lend a helping hand. I&#8217;ll list my personal favorite websites categorized by three major design pools: web showcasing, typography, and digital art.</p>
<p><span id="more-73"></span></p>
<h2>CSS / XHTML / Flash Showcases</h2>
<h5>Digital beauty in the form of web design&#8230;</h5>
<p>The easiest place to gather hordes of inspirational material is among the hundreds of CSS/XHTML and Flash showcase websites. Each of these showcase websites are dedicated to the programmers looking for inspiration through others works. Here are a few of the best:</p>
<h3><a href="http://cssvault.com/" target="_blank">CSS Vault</a> &#038; <a href="http://designshack.co.uk/" target="_blank">Design Shack</a></h3>
<p>Both <a href="http://cssvault.com/" target="_blank">CSS Vault</a> and <a href="http://designshack.co.uk/" target="_blank">Design Shack</a> have a huge collection of CSS-based websites that offer the common user the ability to comment and rate each submission. The Vault also showcases a load of css <a href="http://cssvault.com/resources/demos/">demos</a>, <a href="http://cssvault.com/resources/hacks/">hacks</a>, and <a href="http://cssvault.com/resources/tools/">tools</a>, while the Shack sports bitchin&#8217; <a href="http://designshack.co.uk/tutorials/">tutorials</a>.</p>
<h3><a href="http://designsnack.com/" target="_blank">Design Snack</a></h3>
<p>Although very similar to CSS Vault and Design Shack, <a href="http://designsnack.com/">Design Snack</a> uses cookies to award submissions a ranking on their website. Registered users of Design Snack can rate submissions, much the same way <a href="http://digg.com">Digg</a> users rate articles &#8211; the popular ratings get noticed and awarded, while the runts of the group are dropped from the website.</p>
<h3><a href="http://www.stylegala.com/" target="_blank">Stylegala</a></h3>
<p><a href="http://www.stylegala.com/">Stylegala</a> stands out from the rest by syndicating important design-related news directly onto their website. This, along with their groovy <a href="http://www.stylegala.com/features/">features</a> section, and wicked <a href="http://forum.stylegala.com/">forum</a> gives them a special place in my code-ridden heart.</p>
<h3><a href="http://www.thefwa.com/" target="_blank">FWA</a></h3>
<p>Without a doubt, <a href="http://www.thefwa.com/">FWA</a> is one of the most pristine Flash web awards on the net, showcasing over 2,300 websites in the last seven years. To be listed or better yet, receive Site Of The Day (S.O.T.D.) or Site Of The Month (S.O.T.M.) notoriety, is a real honor. Plenty of talent listed for the gawking.</p>
<h3><a href="http://alistapart.com/topics/design/" target="_blank">A List Apart &#8211; Design</a></h3>
<p>Because of the abundance of well-written articles on <a href="http://alistapart.com/topics/design/">A List Apart</a>, this website will no doubt appear once for each category. Though the website itself is pure beauty, A List Apart&#8217;s purpose is to provide meaningful web reads for us geeks. They succeed.</p>
<p><!-- typography --></p>
<h2>Typographic Hotness</h2>
<h5>It&#8217;s not what you say, but how you display it&#8230;</h5>
<p>It may not be the most interesting of topics, but typography is probably the most important detail of web design. The text spacing, positioning, color, size, and angle can make or break a designs (web or print related) appeal. When you&#8217;re in the mood for some typographic porn, these sites might tickle your fancy:</p>
<h3><a href="http://ilovetypography.com/" target="_blank">I Love Typography</a></h3>
<p><a href="http://ilovetypography.com/">I Love Typography</a> is hands down one of the best typography related websites &#8211; not only are endless examples archived for viewing pleasure, but its authors frequently attempt to explain <em>why</em> certain designs are more appealing than others.</p>
<h3><a href="http://typographica.org/" target="_blank">Typographica</a></h3>
<p><a href="http://typographica.org/">Typographica</a> says it best: &#8220;Typographica is a journal of typography featuring news, observations, and open commentary on fonts and typographic design.&#8221; One of my favorite typography journals.</p>
<h3><a href="http://www.alistapart.com/topics/design/typography/" target="_blank">A List Apart &#8211; Typography</a></h3>
<p>Once again <a href="http://www.alistapart.com/topics/design/typography/">A List Apart</a> makes it into my list of favorites &#8211; this time for typography. The first true typography article I ever read came from A List Apart: <a href="http://alistapart.com/articles/typography">Typography Matters</a>.</p>
<h3><a href="http://www.smashingmagazine.com/category/fonts/" target="_blank">Smashing Magazine</a></h3>
<p>Although <a href="http://www.smashingmagazine.com/category/fonts/">Smashing Magazine</a> spreads across each of these categories nicely, it&#8217;s typography section is especially nice. There generous gift of free fonts once a month and &#8220;Monday Inspiration&#8221; articles quickly have you dreaming with font.</p>
<h3><a href="http://blog.iso50.com/" target="_blank">ISO50</a></h3>
<p>Scott Hansen, a typography god, created <a href="http://blog.iso50.com/">ISO50</a> to display his visual works.<br />
Easily a print design prodigy, Scott has repeatedly inspired me to think outside and even beyond the box.</p>
<h3><a href="http://www.markboulton.co.uk/journal/comments/five_simple_steps_to_better_typography/" target="_blank">Mark Boulton</a></h3>
<p>Though <a href="http://www.markboulton.co.uk/journal/comments/five_simple_steps_to_better_typography/">Mark Boulton&#8217;s</a> website has plenty of useful information, this post in particular is one of the best crash courses in learning better typography habits that I&#8217;ve ever read. Take ten minutes to absorb the tips &#8211; be a better designer. As simple as that.</p>
<p><!-- art --></p>
<h2>Art, The Physical Kind</h2>
<h5>Inspiration that hangs from your walls&#8230;</h5>
<p>Yes, there are <em>many</em> kinds of art and no, I&#8217;m not defining art as anything you can hang on your wall. However, surrounding yourself with inspirational works <em>outside</em> of your computer can help in grasping real world print and design. Here are a few artists that inspire me on a daily basis:</p>
<h3><a href="http://dlanham.com/" target="_blank">David Lanham</a></h3>
<p>Digital artwork at its best. <a href="http://dlanham.com/">David Lanham</a> takes everything you thought you knew about artwork and makes it better &#8211; way better. The colors are amazing &#8211; the prints so perfectly detailed. Every print available for purchase also comes in digital form, as a desktop wallpaper, allowing you to capture the inspirational goodness on all mediums.</p>
<h3><a href="http://www.scottsaw.com/" target="_blank">Scott Saw</a></h3>
<p>Patterns are <a href="http://www.scottsaw.com/">Scott Saw&#8217;s</a> obsession. His work is littered with brilliantly colored stencils, covered with scenes of nature, mechanical objects, or spiritual innuendoes. I personally have a small collection of Scott&#8217;s work &#8211; I recommend starting your own.</p>
<h3><a href="http://www.processrecess.com/ target="_blank">ProcessRecess &#8211; James Jean</a></h3>
<p>A beautiful site coupled with amazing artwork you can actually buy &#8211; <a href="http://www.processrecess.com/">James Jean</a> works magic on a large number of different mediums, including glass and aluminum. His use of gradients makes him my personal hero.</p>
<h3><a href="http://www.555design.org/" target="_blank">Are Age &#8211; 555[Design]</a></h3>
<p><a href="http://www.555design.org">Are Age</a> is his art name and real-world art mixed with Photoshop skills is his art game. (I rhymed.) Less fiction, more life. Are Age delivers rich content saturated in complex detail. One of his works are sure to appear on my wall soon.</p>
<h2>What Did I Miss?</h2>
<h5>Add your favorite inspirations&#8230;</h5>
<p>Obviously my inspirations might differ from yours. Add the sites that inspire your creative by leaving a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.iamkoa.net/2008/02/13/websites-dedicated-to-design-inspiration-web-showcasing-typography-digital-art/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Updates &amp; Checkboxes &amp; Loadbars! Oh My!</title>
		<link>http://labs.iamkoa.net/2007/12/21/updates-checkboxes-loadbars-oh-my/</link>
		<comments>http://labs.iamkoa.net/2007/12/21/updates-checkboxes-loadbars-oh-my/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 19:22:02 +0000</pubDate>
		<dc:creator>Koa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://labs.iamkoa.net/2007/12/21/updates-checkboxes-loadbars-oh-my/</guid>
		<description><![CDATA[Yep. I&#8217;m mixing programming references with The Wizard of Oz. Shut up. The all-too-awesome PHPMailer class has been updated and is awaiting your download. If you use MooTools (or even if you don&#8217;t), Vacuous Virtuoso&#8217;s Fancy Form is totally worth checking out. It&#8217;s a mix of CSS and Javascript that enables you to create custom [...]]]></description>
			<content:encoded><![CDATA[<p>Yep. I&#8217;m mixing programming references with <a href="http://www.imdb.com/title/tt0032138/quotes">The Wizard of Oz</a>. Shut up.</p>
<p>The all-too-awesome <a href="http://labs.iamkoa.net/2007/11/27/a-simplesecure-email-class-for-phpmailer/">PHPMailer class</a> has been updated and is awaiting your download.</p>
<p>If you use <a href="http://mootools.net/">MooTools</a> (or even if you don&#8217;t), Vacuous Virtuoso&#8217;s <a href="http://lipidity.com/fancy-form/">Fancy Form</a> is totally worth checking out. It&#8217;s a mix of CSS and Javascript that enables you to create custom form checkboxes. There are other script on the net that claim to do the same thing, but none are as cross-browser compatible.</p>
<p>Lastly, to add a splash of color to your ajax load processes, check out Bram Van Damme&#8217;s <a href="http://www.bram.us/projects/js_bramus/jsprogressbarhandler/">Progress Bar Handler</a>. It&#8217;s probably the smoothest, best looking non-flash based progress bar on the net.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.iamkoa.net/2007/12/21/updates-checkboxes-loadbars-oh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vision, Simple PHP/JS/CSS Photo Viewer</title>
		<link>http://labs.iamkoa.net/2007/11/19/vision-simple-phpjscss-photo-viewer/</link>
		<comments>http://labs.iamkoa.net/2007/11/19/vision-simple-phpjscss-photo-viewer/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 01:24:42 +0000</pubDate>
		<dc:creator>Koa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Labs]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://labs.iamkoa.net/2007/11/19/vision-simple-phpjscss-photo-viewer/</guid>
		<description><![CDATA[The simplest image viewer known to man has been created. Visi&#243;n uses a light touch of PHP, Javascript and CSS to create a straightforward, stylish image viewer. It can be incorporated into any website in under three minutes and takes up less than 20kb of space. Stop reading this and download Visi&#243;n. This article covers [...]]]></description>
			<content:encoded><![CDATA[<p>The simplest image viewer known to man has been created. Visi&oacute;n uses a light touch of PHP, Javascript and CSS to create a straightforward, stylish image viewer. It can be incorporated into any website in under three minutes and takes up less than 20kb of space. Stop reading this and <a href="http://iamkoa.net/vision/" target="_blank">download Visi&oacute;n</a>.</p>
<p><span id="more-44"></span></p>
<div style="text-align:center;width:100%"><a href='http://iamkoa.net/vision/' title='Vision, Simple PHP/JS/CSS Photo Viewer' target='_blank'><img src='http://labs.iamkoa.net/wp-content/uploads/2007/11/vision_screenshot.jpg' alt='Vision Screenshot' /></a></div>
<p></p>
<blockquote><p>
This article covers <u>how</u> to use Visi&oacute;n. To learn more about Visi&oacute;n, <a href="http://iamkoa.net/vision/">check this out</a>.
</p></blockquote>
<h2>Setup Vision</h2>
<p>If you haven&#8217;t already done so, <a href='http://labs.iamkoa.net/wp-content/uploads/2007/11/vision-viewer.zip' title='Vision, Simple PHP/JS/CSS Photo Viewer'>download a copy of Visi&oacute;n</a> and unzip it to any location that&#8217;s able to parse PHP files, like localhost.</p>
<p>For a basic install of Visi&oacute;n, the only file you need to edit is <code>index.php</code>:</p>
<pre class="brush:php">
/**  setup  **/
$imgDir	= "img"; 		// image directory
$imgSub	= false;		// include sub directories when gathering images?
$imgId	= "lgImage"; 	// id tag for images
</pre>
<p>To successfully pull images from your images folder, edit <code>$imgDir</code> accordingly. The above example would be looking for images in a folder called &#8220;img&#8221;, located in the same directory as the <code>index.php</code> file you are editing.</p>
<p>If you would also like to include images located in folders <em>within</em> the images folder you&#8217;ve specified, set the <code>$imgSub</code> variable to <strong>true</strong>. If <code>$imgSub</code> remains set to <strong>false</strong>, all sub folders within the specified images folder will be ignored.</p>
<p>Lastly, you may choose to specify the <strong>id</strong> used for your image on display. Under most circumstances, you won&#8217;t have to change this value.</p>
<h2>Integrate Vision</h2>
<p>Once you&#8217;ve got the <code>index.php</code> edited to your liking, integrating Visi&oacute;n into a web application of your choice is a matter of copying and pasting a few lines of code.</p>
<p>Make sure all the PHP code (lines 1-11) is copied, along with the javascript code (lines 25-37), and content within the <code>id="content"</code> div.</p>
<h2>Easy, Huh?</h2>
<p>That wasn&#8217;t too hard, right? If you&#8217;ve hacked/tweaked/etc Visi&oacute;n for your website, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.iamkoa.net/2007/11/19/vision-simple-phpjscss-photo-viewer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Displaying PNG&#8217;s in IE &#8211; Inline vs External CSS</title>
		<link>http://labs.iamkoa.net/2007/10/15/displaying-pngs-in-ie-inline-vs-external-css/</link>
		<comments>http://labs.iamkoa.net/2007/10/15/displaying-pngs-in-ie-inline-vs-external-css/#comments</comments>
		<pubDate>Mon, 15 Oct 2007 22:37:03 +0000</pubDate>
		<dc:creator>Koa</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://labs.iamkoa.net/2007/10/15/displaying-pngs-in-ie-inline-vs-external-css/</guid>
		<description><![CDATA[According to Microsoft support , correctly displaying PNG&#8217;s in Internet Explorer should be as simple as copying &#038; pasting their example. This is the CSS that Microsoft claims will correctly display : filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='crop'); The above code will work for inline CSS, that is, CSS mixed with HTML: &#60;div id="png_bg" style="position:absolute; left:140px; height:400; width:400; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://support.microsoft.com/kb/294714" target="_blank">Microsoft support </a>, correctly displaying PNG&#8217;s in Internet Explorer should be as simple as copying &#038; pasting their example. This is the CSS that Microsoft claims will correctly display :</p>
<pre><code>filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='crop');</code></pre>
<p>The above code will work for inline CSS, that is, CSS mixed with HTML:</p>
<pre><code>&lt;div id="png_bg" style="position:absolute; left:140px; height:400; width:400;
     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
     src='image.png', sizingMethod='crop');" &gt;
&lt;/div&gt;</code></pre>
<p>If you don&#8217;t want to mix your CSS with your HTML, external style sheets are the obvious choice. However the above example won&#8217;t work in an external style sheet. Instead, the path to <strong>image.png</strong> needs to be absolute, like this: <code>/direct/path/to/image.png</code></p>
<p>Your external style sheet would look something like this:</p>
<pre><code>#png_bg {
    background-image: none;
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='/path/to/image.png');
}</code></pre>
<p>Shout at me if I got this all wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.iamkoa.net/2007/10/15/displaying-pngs-in-ie-inline-vs-external-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
