<?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>Hot Koehl &#187; css</title>
	<atom:link href="http://frankkoehl.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://frankkoehl.com</link>
	<description>The more you know, the more you don't know</description>
	<lastBuildDate>Mon, 16 Jan 2012 22:52:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>And a Dim Bulb Brightens&#8230;</title>
		<link>http://frankkoehl.com/2008/03/and-a-dim-bulb-brightens/</link>
		<comments>http://frankkoehl.com/2008/03/and-a-dim-bulb-brightens/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 16:41:15 +0000</pubDate>
		<dc:creator>Frank</dc:creator>
				<category><![CDATA[For everyone]]></category>
		<category><![CDATA[For techies]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://frankkoehl.com/2008/03/28/and-a-dim-bulb-brightens/</guid>
		<description><![CDATA[Though developer by trade, I think I can talk CSS fairly intelligently with any hardcore designer. But the one thing that always eluded me a bit was the &#8220;em&#8221; sizing element. I could never find a definitive description of just how the hell they actually worked. Today I put that one to bed, thanks a [...]]]></description>
			<content:encoded><![CDATA[<p>Though developer by trade, I think I can talk CSS fairly intelligently with any hardcore designer. But the one thing that always eluded me a bit was the &#8220;em&#8221; sizing element. I could never find a definitive description of just how the hell they actually worked.</p>
<p>Today I put that one to bed, thanks a <a href="http://www.alistapart.com/articles/howtosizetextincss/">straightforward article</a> on <a href="http://www.alistapart.com">A List Apart</a>&#8230;</p>
<blockquote><p>Working from a default of 16px, the following styles should give the desired text sizes:</p>
<pre class="css">.bodytext p {</pre>
<pre class="css">      font-size:0.875em; /* 16x.875=14 */

}.sidenote {</pre>
<pre class="css">      font-size:0.75em; /* 16x0.75=12 */

}</pre>
</blockquote>
<p>If you want to work with em&#8217;s, your sizes are all relative to 16 pixels.  Simply multiply the size by 16 to get the actual display size.</p>
<p>Be sure to convey your &#8220;Well, duh!&#8221; reactions in the comments.</p>
<p><strong>Update: </strong> When it rains it pours. Playing with my newfound logic, I&#8217;ve also learned that you can adjust what an em is relative to based on different font-size definitions in nested page elements.  Take this simple example&#8230;</p>
<pre class="html">&lt;div style="font-size:0.5em" /&gt;</pre>
<pre class="html">  &lt;div style="font-size:1.5em" /&gt;</pre>
<pre class="html">    What size is this?</pre>
<pre class="html">  &lt;/div&gt;</pre>
<pre class="html">&lt;/div&gt;</pre>
<p>The text in between the two div tags will actually work out to be 0.75em (0.5 x 1.5 = 0.75), which is equal to a pixel size of 12 (see quote above).  Now I gotta learn to play carefully with these things&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://frankkoehl.com/2008/03/and-a-dim-bulb-brightens/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

