<?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>Work that Web &#187; css</title>
	<atom:link href="http://davidvanvickle.com/blog/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidvanvickle.com/blog</link>
	<description>My independent creative efforts.</description>
	<lastBuildDate>Sun, 29 Aug 2010 05:38:25 +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>The Mystery of CSS Float Property</title>
		<link>http://davidvanvickle.com/blog/2009/10/19/the-mystery-of-css-float-property/</link>
		<comments>http://davidvanvickle.com/blog/2009/10/19/the-mystery-of-css-float-property/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 16:19:25 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://davidvanvickle.com/blog/?p=607</guid>
		<description><![CDATA[The Mystery of CSS Float Property « Smashing Magazine. Leave it to Smashing Magazine.  Awesome ideas for common CSS challenges with the wonderful float property]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/">The Mystery of CSS Float Property «  Smashing Magazine</a>.</p>
<p>Leave it to Smashing Magazine.  Awesome ideas for common CSS challenges with the wonderful float property.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidvanvickle.com/blog/2009/10/19/the-mystery-of-css-float-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS margins study</title>
		<link>http://davidvanvickle.com/blog/2009/06/28/css-margins-study/</link>
		<comments>http://davidvanvickle.com/blog/2009/06/28/css-margins-study/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 01:43:58 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://davidvanvickle.com/blog/?p=395</guid>
		<description><![CDATA[CSS coding delivers more &#8220;WTF moments&#8221; than any other work activity I engage in these days.  I need to understand it better, specifically CSS margins and floats. Made some time today to study up. I read and re-read the articles below. They are aging but speak to a time when the evil IE6 was even ]]></description>
			<content:encoded><![CDATA[<p>CSS coding delivers more &#8220;WTF moments&#8221; than any other work activity I engage in these days.  I need to understand it better, specifically CSS margins and floats. Made some time today to study up.</p>
<p>I read and re-read the articles below.  They are aging but speak to a time when the evil IE6 was even more prominent than it is years later in 2009.</p>
<ul>
<li><a href="http://warpspire.com/tipsresources/web-production/css-column-tricks/">Top reasons your CSS columns are messed up</a></li>
<li><a href="http://www.andybudd.com/archives/2003/11/no_margin_for_error/">No Margin for Error</a></li>
<li><a href="http://www.w3.org/TR/CSS2/visuren.html#float-rules">CSS standards (suggestions?)</a></li>
</ul>
<p>General insights include:</p>
<ul>
<li>Kill IE&#8217;s double margin bug with <code>display:inline</code> on a floated items.</li>
<li>When 2 adjacent elements&#8217; margins meet, only the bigger margin is used.</li>
<li>If an item&#8217;s 2 opposite margins meet, they both go away (self-collapse)</li>
<li>Nested items <strong>without padding or border</strong> will cause the top and bottom margins of all to collapse. Left and right margins remain. Adding padding or border makes the margin come back.</li>
<li>Set <code>overflow:hidden</code> on columns to prevent object blow out in IE.</li>
<li>To make columns, <code>float:left</code> on one and <code>float:right</code> on the other.</li>
<li>Self clear an object (always clear floats) with the <code>:after</code> filter.  (Example below.)</li>
<li>Center an item by setting <code>auto</code> on left and right margins.  <code>margin:0 auto</code>.</li>
<li>In addition to auto margins, to center an item in IE, also use <code>text-align:center</code> on parent, then reset text-align in child, usually <code>text-align:left</code>.</li>
</ul>
<p><strong><a href="http://warpspire.com/tipsresources/web-production/css-column-tricks/">Self clear example</a></strong></p>
<p><code>.columns:after {<br />
content: ".";<br />
display: block;<br />
height: 0;<br />
clear: both;<br />
visibility: hidden;<br />
}</code></p>
<p><strong>Convert a list into a horizontal menu</strong></p>
<p>Using background images instead of text.  Fixed width, left margins, using <a href="http://warpspire.com/tipsresources/web-production/css-column-tricks/">negative margin</a> on UL to cancel first margin.<strong><a href="http://warpspire.com/tipsresources/web-production/css-column-tricks/"><br />
</a></strong></p>
<p><code>&lt;ul class="menu"&gt;<br />
&lt;li&gt;&lt;a href="#somewhere1" id="link1"&gt;&lt;em&gt;link 1&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#somewhere2" id="link2"&gt;&lt;em&gt;link 2&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#somewhere3" id="link3"&gt;&lt;em&gt;link 3&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
</code></p>
<p><code>ul.menu {<br />
margin:0 0 0 -20px;<br />
float:left;<br />
width:100%;<br />
}<br />
ul.menu li {<br />
list-style-type:none;<br />
display:inline;<br />
float:left;<br />
margin:0 0 0 20px;<br />
}<br />
ul.menu li a {<br />
display:block;<br />
height:50px;<br />
background-color: #0f0;<br />
}<br />
ul.menu li a em {<br />
display:none;<br />
}<br />
ul.menu li a#link1 {<br />
width:100px;<br />
background-image: url(link1.png);<br />
}<br />
ul.menu li a#link1:hover {<br />
background-image: url(link1-over.png);<br />
}<br />
ul.menu li a#link2 {<br />
width:110px;<br />
background-image: url(link2.png);<br />
}<br />
ul.menu li a#link2:hover {<br />
background-image: url(link2-over.png);<br />
}<br />
ul.menu li a#link3 {<br />
width:120px;<br />
background-image: url(link3.png);<br />
}<br />
ul.menu li a#link3:hover {<br />
background-image: url(link3-over.png);<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://davidvanvickle.com/blog/2009/06/28/css-margins-study/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
