<?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>dustincaruso.com &#187; CSS</title>
	<atom:link href="http://dustincaruso.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://dustincaruso.com</link>
	<description>custom web app development</description>
	<lastBuildDate>Mon, 29 Mar 2010 11:44:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IE CSS hacks</title>
		<link>http://dustincaruso.com/css/ie-css-hacks/</link>
		<comments>http://dustincaruso.com/css/ie-css-hacks/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 17:20:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://dustincaruso.com/2007/11/24/ie-css-hacks/</guid>
		<description><![CDATA[In my web developing adventures, I&#8217;ve come across one definite truth &#8211; Internet Explorer is a big pain in the ass. Version 7 has come a long way from version 6, but it is still a bit quirky. Seeing as how I write code in a text editor (Coda is my tool of choice), I [...]]]></description>
			<content:encoded><![CDATA[<p>In my web developing adventures, I&#8217;ve come across one definite truth &#8211; Internet Explorer is a big pain in the ass. Version 7 has come a long way from version 6, but it is still a bit quirky. Seeing as how I write code in a text editor (<a href="http://www.panic.com/coda/" target="_new">Coda</a> is my tool of choice), I can plug away all day long writing standards-compliant code knowing that when I go to view it in a a GOOD browser like Safari or Firefox, everything will look the way that I had intended. I also know that when I go to open the page in IE, there&#8217;s always going to be some sort of surprise. I have gotten good at re-writing things so that they render similarly in ALL browsers &#8211; meaning &#8211; you can write code that IE won&#8217;t mess up and still get the desired effect in Safari and Firefox &#8211; but every once in a while that solution is out of reach.  When I hit that roadblock, there are two favorite CSS hacks in my goodie bag&#8230;</p>
<p><code><br />
/* IE6 and below */<br />
* html #myId { }</p>
<p>/* IE7 */<br />
*:first-child+html #myId { }<br />
</code></p>
<p>&nbsp;<br />Both of the hacks above are valid CSS, so no worries with messing up your page validations using these. Important note &#8211; always try everything you can to NOT use these first, and make these a last resort.  You&#8217;ll be a better coder because of it.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dustincaruso.com/css/ie-css-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transparent PNGs in IE6</title>
		<link>http://dustincaruso.com/xhtml/pngs-in-ie6-and-below/</link>
		<comments>http://dustincaruso.com/xhtml/pngs-in-ie6-and-below/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 23:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.dustincaruso.com/?p=3</guid>
		<description><![CDATA[Everybody knows that IE versions 5.5 and 6 cannot render a PNG image with alpha transparency correctly. The result is a visible &#8220;box&#8221; around the image highlighting what is supposed to be the transparent part. In the past I had used the &#8220;IE7&#8243; JavaScript that i had found on the web before IE7 was actually [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody knows that IE versions 5.5 and 6 cannot render a PNG image with alpha transparency correctly. The result is a visible &#8220;box&#8221; around the image highlighting what is supposed to be the transparent part. In the past I had used the &#8220;IE7&#8243; JavaScript that i had found on the web before IE7 was actually released. It involved including a JavaScript file in the header of your page that was responsible for post-processing all PNGs on the page just after page load using Microsoft&#8217;s proprietary IE filter: AlphaImageLoader. While that method works fine if you have a webpage or website with many PNG images, I thought I&#8217;d share a quicker way to do it inline, should you ever have the need to deal with just a single PNG. This quick little piece of code will write PNGs into your webpage in such a way that Internet Explorer below version 7 will &#8220;draw&#8221; the image properly with full alpha transparency.</p>
<p>In order to do this we will actually write the image into the page twice &#8211; once for IE6 and below, and again for all the other browsers. Here we go&#8230;<br />&nbsp;</p>
<p><b>1</b> &#8211; create a 1 pixel by 1 pixel transparent GIF image and drop that in your images directory (i usually name it &#8220;spacer.gif&#8221;).</p>
<p><b>2</b> &#8211; here&#8217;s the XHTML to put in the <code>&lt;body&gt;</code> of your document&#8230;</p>
<p><code><br />
&lt;!--[if lt IE 7]&gt;<br />
&lt;img id="ie6image" src="spacer.gif" alt="" style="filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='myimage.png', sizingMethod='image');" /&gt;<br />
&lt;![endif]--&gt;</p>
<p>&lt;img id="theimage" src="myimage.png" alt="" /&gt;<br />
</code></p>
<p class="note">&nbsp;<br />* notice how we write the image the first time using Microsoft&#8217;s Alpha Image Loader &#8211; and how this is wrapped inside IE conditional comments which basically say &#8220;if the browser is IE version less than 7&#8243; &#8211; then we write the image again the &#8220;normal&#8221; way for all other browsers.<br />&nbsp;</p>
<p><b>3</b> &#8211; here&#8217;s the CSS to put in the <code>&lt;head&gt;</code> of your document or external stylesheet&#8230;</p>
<p><code><br />
#theimage, #ie6image {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 100px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 100px;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border: 0px;<br />
}</p>
<p>* html #theimage {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display: none;<br />
}<br />
</code></p>
<p class="note">&nbsp;<br />* the second style above is the popular * html CSS hack that only IE version 6 or lower will read &#8211; telling those browsers to not display the second image.<br />&nbsp;</p>
<p>And there you have it &#8211; a relatively simple way to solve the problem of alpha transparency in older versions of Internet Explorer.  The best part about this approach is that it uses no JavaScript &#8211; just standards-compliant XHTML and CSS.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://dustincaruso.com/xhtml/pngs-in-ie6-and-below/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
