<?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>workblog &#187; CSS</title>
	<atom:link href="http://iandunn.name/workblog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://iandunn.name/workblog</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 17:53:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Z-Index Stacking Contexts</title>
		<link>http://iandunn.name/workblog/z-index-stacking-contexts/</link>
		<comments>http://iandunn.name/workblog/z-index-stacking-contexts/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 17:36:36 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=306</guid>
		<description><![CDATA[One important thing to keep in mind while working with z-index is that multiple stacking orders are created based on the markup hierarchy. This means that an element with a z-index of 30 can actually appear below an element with a z-index of 20, if the z-index of the original element&#8217;s parent is 10.
Paolo Lombardi [...]]]></description>
			<content:encoded><![CDATA[<p>One important thing to keep in mind while working with <a href="http://www.w3schools.com/css/pr_pos_z-index.asp">z-index</a> is that multiple stacking orders are created based on the markup hierarchy. This means that an element with a z-index of 30 can actually appear <em>below</em> an element with a z-index of 20, if the z-index of the original element&#8217;s <em>parent</em> is 10.</p>
<p>Paolo Lombardi explains this well in his article on <a href="https://developer.mozilla.org/en/Understanding_CSS_z-index/The_stacking_context">stacking context</a>, and includes this helpful diagram:</p>
<p><a href="https://developer.mozilla.org/en/Understanding_CSS_z-index/The_stacking_context"><img class="alignnone" src="https://developer.mozilla.org/@api/deki/files/913/=Understanding_zindex_04.png" alt="Example of multiple=" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/z-index-stacking-contexts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Selector Browser Compatbility</title>
		<link>http://iandunn.name/workblog/css-selector-browser-compatbility/</link>
		<comments>http://iandunn.name/workblog/css-selector-browser-compatbility/#comments</comments>
		<pubDate>Mon, 17 May 2010 18:30:20 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=295</guid>
		<description><![CDATA[kimblim.dk has a chart showing browser support for various CSS selectors, including pseudo selectors. It includes CSS versions 1 through 3 and all of the major browser versions.
]]></description>
			<content:encoded><![CDATA[<p>kimblim.dk has a <a href="http://kimblim.dk/css-tests/selectors/">chart showing browser support for various CSS selectors</a>, including pseudo selectors. It includes CSS versions 1 through 3 and all of the major browser versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/css-selector-browser-compatbility/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Content Above Anchors Disappear</title>
		<link>http://iandunn.name/workblog/content-above-anchors-disappear/</link>
		<comments>http://iandunn.name/workblog/content-above-anchors-disappear/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 17:22:16 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=257</guid>
		<description><![CDATA[It turns out there&#8217;s a serous problem with the One True Layout method of creating equal height columns. All of the content above an anchor will be shifted up, making it seem like it disappeared. There aren&#8217;t any universal or reliable fixes for this, so the Faux Columns method is probably the best choice if [...]]]></description>
			<content:encoded><![CDATA[<p>It turns out there&#8217;s a serous problem with <a href="http://www.positioniseverything.net/articles/onetruelayout/equalheight">the One True Layout method of creating equal height columns</a>. All of <a href="http://www.positioniseverything.net/articles/onetruelayout/appendix/equalheightproblems#linking">the content above an anchor will be shifted up</a>, making it seem like it disappeared. There aren&#8217;t any universal or reliable fixes for this, so the <a href="http://www.alistapart.com/articles/fauxcolumns/">Faux Columns</a> method is probably the best choice if it&#8217;ll fit the design.</p>
<p><a href="http://www.positioniseverything.net/articles/onetruelayout/equalheight"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/content-above-anchors-disappear/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using overflow to Clear Floated Elements</title>
		<link>http://iandunn.name/workblog/using-overflow-to-clear-floated-elements/</link>
		<comments>http://iandunn.name/workblog/using-overflow-to-clear-floated-elements/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 19:11:32 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=202</guid>
		<description><![CDATA[If you have an element whose children are all floated, it won&#8217;t have any height to it. I&#8217;ve always just put an extra &#60;div style=&#8221;clear: both;&#8221;&#62; at the bottom of the container to force it to clear, but it looks like there&#8217;s been a much better way for a few years now. Alex Walker points [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an element whose children are all floated, it won&#8217;t have any height to it. I&#8217;ve always just put an extra &lt;div style=&#8221;clear: both;&#8221;&gt; at the bottom of the container to force it to clear, but it looks like there&#8217;s been a much better way for a few years now. Alex Walker points out that you can just <a href="http://www.sitepoint.com/blogs/2005/02/26/simple-clearing-of-floats/">set overflow:auto on the container</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/using-overflow-to-clear-floated-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Placing an Element In Front of an Object</title>
		<link>http://iandunn.name/workblog/placing-an-element-in-front-of-an-object/</link>
		<comments>http://iandunn.name/workblog/placing-an-element-in-front-of-an-object/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 19:04:34 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=177</guid>
		<description><![CDATA[Here&#8217;s how to have a drop-down menu appear on top of a Flash object:

Add a z-index of 0 to the object&#8217;s containing div
Add &#60;param name=”wmode” value=”transparent”&#62; inside the object tag
Add wmode=”transparent” to the embed tag

via Sheriar Designs
]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to have a drop-down menu appear on top of a Flash object:</p>
<ol>
<li>Add a z-index of 0 to the object&#8217;s containing div</li>
<li>Add &lt;param name=”wmode” value=”transparent”&gt; inside the object tag</li>
<li>Add wmode=”transparent” to the embed tag</li>
</ol>
<p>via <a href="http://manisheriar.com/blog/flash_objects_and_z_index">Sheriar Designs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/placing-an-element-in-front-of-an-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Way to Define Font Sizes in CSS</title>
		<link>http://iandunn.name/workblog/the-best-way-to-define-font-sizes-in-css/</link>
		<comments>http://iandunn.name/workblog/the-best-way-to-define-font-sizes-in-css/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:15:23 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=160</guid>
		<description><![CDATA[Often designers will want fixed font sizes so that the text on the actual size will exactly match their mockups, but The Web is Not Print (see also Pixel Perfect Design Does Not Necessarily Equal Good Web Design). A List Apart has a worked out a good method for sizing text consistently across browsers while [...]]]></description>
			<content:encoded><![CDATA[<p>Often designers will want fixed font sizes so that the text on the actual size will exactly match their mockups, but <a href="http://www.cactusflower.org/the-web-is-not-print/">The Web is Not Print</a> <em>(see also </em><a href="http://webdesign.about.com/od/webdesignbasics/a/aa061807.htm"><em>Pixel Perfect Design Does Not Necessarily Equal Good Web Design</em></a><em>)</em>. A List Apart has a worked out a good method for <a href="http://www.alistapart.com/articles/howtosizetextincss/">sizing text consistently across browsers while maintaining the user&#8217;s ability to resize the text</a> to fit their needs.</p>
<p><a href="http://webdesign.about.com/od/webdesignbasics/a/aa061807.htm"></a></p>
<p>All you need to do is define a baseline size and line height in the body tag, and then use em&#8217;s throughout the rest of the site.</p>
<pre name="code" class="css">

body
{
font-size:100%;
line-height:1.125em; /* 16×1.125=18 */
}

.bodytext p
{
font-size:0.875em;
}

.sidenote
{
font-size:0.75em;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/the-best-way-to-define-font-sizes-in-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Drop-Down Menus</title>
		<link>http://iandunn.name/workblog/154/</link>
		<comments>http://iandunn.name/workblog/154/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 21:59:41 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=154</guid>
		<description><![CDATA[Tomas Bagdanavicius has created a fast, themeable, cross-browser CSS-based Drop-Down Menu Framework that only uses Javascript for IE6.
]]></description>
			<content:encoded><![CDATA[<p>Tomas Bagdanavicius has created a fast, themeable, cross-browser CSS-based <a href="http://www.lwis.net/free-css-drop-down-menu/">Drop-Down Menu Framework</a> that only uses Javascript for IE6.</p>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/154/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preloading Images</title>
		<link>http://iandunn.name/workblog/preloading-images/</link>
		<comments>http://iandunn.name/workblog/preloading-images/#comments</comments>
		<pubDate>Fri, 29 May 2009 18:10:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=100</guid>
		<description><![CDATA[I&#8217;ve been looking for a good way to preload images for rollovers, but it seems like a lot of the common methods have problems.

There are reliability issues using a JavaScript Image object or document.write()
Some browsers won&#8217;t load a display:none containing element

So far the best way I&#8217;ve found is Perishable Press&#8217; Better Image Preloading without JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for a good way to preload images for rollovers, but it seems like a lot of the common methods have problems.</p>
<ul>
<li>There are reliability issues using a JavaScript Image object or document.write()</li>
<li>Some browsers won&#8217;t load a display:none containing element</li>
</ul>
<p>So far the best way I&#8217;ve found is Perishable Press&#8217; <a href="http://perishablepress.com/press/2008/04/15/pure-css-better-image-preloading-without-javascript/">Better Image Preloading without JavaScript</a> method. You can set the hover images as the background on the regular image, and then position it outside of the image, so it doesn&#8217;t show up:</p>
<pre name="code" class="css">

#foo1 {background: url(foo1-hover.png) no-repeat -500px -500px ;}
#foo2 {background: url(foo2-hover.png) no-repeat -500px -500px ;}
#foo3 {background: url(foo3-hover.png) no-repeat -500px -500px ;}
</pre>
<p>The problem I have with this one, though, is that the hover images will be loaded with the rest of the page, making it slower. I don&#8217;t think they should be loaded until after the rest of the page has finished loading. So, I used SitePoint&#8217;s <a href="http://www.sitepoint.com/blogs/2004/05/26/closures-and-executing-javascript-on-page-load/">addLoadEvent()</a> to assign the background images after the page loads:</p>
<pre name="code" class="javascript">

document.getElementById(&quot;foo1&quot;).style.background = &quot;url(foo1-hover.png) no-repeat -500px -500px&quot;;
document.getElementById(&quot;foo2&quot;).style.background = &quot;url(foo2-hover.png) no-repeat -500px -500px&quot;;
document.getElementById(&quot;foo3&quot;).style.background = &quot;url(foo3-hover.png) no-repeat -500px -500px&quot;;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/preloading-images/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Clearing a Browser&#8217;s default CSS stylesheet</title>
		<link>http://iandunn.name/workblog/clearing-a-browsers-default-css-stylesheet/</link>
		<comments>http://iandunn.name/workblog/clearing-a-browsers-default-css-stylesheet/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 19:04:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=9</guid>
		<description><![CDATA[Clear a browser&#8217;s default CSS stylesheet
Update: After working with it for a little while I prefer using Yahoo&#8217;s Reset CSS, Base CSS and a few custom values to Meyer&#8217;s version. I think he takes it too far (almost to the point of absurdity) with things like stripping the weight from the strong tag.


/* YUI Reset [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Clear a browser&#8217;s default CSS stylesheet</a></p>
<p><strong>Update</strong>: After working with it for a little while I prefer using Yahoo&#8217;s <a href="http://developer.yahoo.com/yui/reset/">Reset CSS</a>, <a href="http://developer.yahoo.com/yui/base/">Base CSS</a> and a few custom values to Meyer&#8217;s version. I think he takes it too far (almost to the point of absurdity) with things like stripping the weight from the strong tag.</p>
<pre name="code" class="css">

/* YUI Reset v2.6.0 */
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:&#039;&#039;;}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}del,ins{text-decoration:none;}
/* YUI Base v2.6.0 */
h1{font-size:138.5%;}h2{font-size:123.1%;}h3{font-size:108%;}h1,h2,h3{margin:1em 0;}h1,h2,h3,h4,h5,h6,strong{font-weight:bold;}abbr,acronym{border-bottom:1px dotted #000;cursor:help;} em{font-style:italic;}blockquote,ul,ol,dl{margin:1em;}ol,ul,dl{margin-left:2em;}ol li{list-style:decimal outside;}ul li{list-style:disc outside;}dl dd{margin-left:1em;}th,td{border:1px solid #000;padding:.5em;}th{font-weight:bold;text-align:center;}caption{margin-bottom:.5em;text-align:center;}p,fieldset,table,pre{margin-bottom:1em;}input[type=text],input[type=password],textarea{width:12.25em;*width:11.9em;}

/* Custom */
table tr td
{
	border: none;
	vertical-align: top;
	text-align: left;
}

ul li ul /* Nested lists */
{
	margin: 0 0 0 40px;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/clearing-a-browsers-default-css-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Targeting properties to IE6 with Valid CSS</title>
		<link>http://iandunn.name/workblog/targeting-properties-to-ie6-with-valid-css/</link>
		<comments>http://iandunn.name/workblog/targeting-properties-to-ie6-with-valid-css/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 14:15:49 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Internet Explorer]]></category>

		<guid isPermaLink="false">http://iandunn.name/workblog/?p=7</guid>
		<description><![CDATA[When I&#8217;m translating a design to markup I can usually get it to look the same in all the major browsers without too much trouble, but every once in awhile there’s a problem with IE6 that I can&#8217;t figure out, or just don’t have the time/energy to deal with the right way.  In the [...]]]></description>
			<content:encoded><![CDATA[<p>When I&#8217;m translating a design to markup I can usually get it to look the same in all the major browsers without too much trouble, but every once in awhile there’s a problem with IE6 that I can&#8217;t figure out, or just don’t have the time/energy to deal with the right way.  In the past I’ve used <a href="http://allinthehead.com/retro/150/css-underscore-hack">the underscore hack</a> to target a specific property to IE6, but the problem with that is that it isn’t valid CSS. Recently I found a way to <a href="http://24ways.org/2005/avoiding-css-hacks-for-internet-explorer">avoid CSS hacks</a> and get the same results with valid CSS. Instead of using the underscore, it uses <a href="http://css.maxdesign.com.au/selectutorial/selectors_child.htm">child selectors</a>, which are valid, but IE6 doesn’t support.</p>
<p>For example, I had a design where one element had to line up perfectly with another, and it was working fine in Firefox/Safari/IE7, but in IE6 it was 3 pixels off, so I did this:</p>
<p>test</p>
<pre name="code" class="css">

#childElement /* This is the element I want to position */
{
position: relative;
left: 113px; /* This targets all browsers, including IE6 */
}

#parentElement &gt; #childElement
{
left: 116px; /* This targets only Firefox/Safari/IE7. IE6 doesn&#039;t support it, so it uses the value above, but the others will use this one instead */
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://iandunn.name/workblog/targeting-properties-to-ie6-with-valid-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
