<?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>Sean Landry Interaction Designer &#187; JQuery</title>
	<atom:link href="http://seanlandry.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanlandry.com</link>
	<description>CSS zealot and user experience maniac</description>
	<lastBuildDate>Tue, 03 Jan 2012 20:04:27 +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>Aligning data with a decimal point using JQuery</title>
		<link>http://seanlandry.com/2009/10/16/aligning-data-with-a-decimal-point-using-jquery/</link>
		<comments>http://seanlandry.com/2009/10/16/aligning-data-with-a-decimal-point-using-jquery/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 14:44:01 +0000</pubDate>
		<dc:creator>slandry</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Information Architecture]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://seanlandry.com/blog/2009/10/16/aligning-data-with-a-decimal-point-using-jquery/</guid>
		<description><![CDATA[Last night I received a real brain twister of a question from @ganarce on my Twitter page. He wanted to know if there was a way to align data within a table using a decimal point &#8220;.&#8221;. Seemed like a fairly routine type of formatting (invoices, data etc.). Without massaging the data ahead of time [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I received a real brain twister of a question from <a href="http://www.twitter.com/ganarce">@ganarce</a> on my <a href="http://www.twitter.com/cssanswers">Twitter page</a>. He wanted to know if there was a way to align data within a table using a decimal point &#8220;.&#8221;. Seemed like a fairly routine type of formatting (invoices, data etc.). Without massaging the data ahead of time to all have the same number of characters before or after the decimal point.</p>
<p><img src='http://seanlandry.com/blog/wp-content/uploads/2009/10/decimal.jpg' alt='Aligning data with a decimal point' /></p>
<p>I went to the W3C to for an <a href="http://www.w3.org/TR/CSS2/text.html#propdef-text-align">explanation on horizontal alignment</a>.  Ah ha! there it was. Easy enough:</p>
<p><strong>col align=&#8221;char&#8221; char=&#8221;.&#8221;</strong></p>
<p>Unfortunately there is <a href="http://reference.sitepoint.com/html/col/char">little or no support for this attribute</a> amongst the Browser community. I found <a href="http://seanlandry.com/decimal_test.html">a method using JQuery</a> that seems to work with IE, FF and Chrome.</p>
<p>Happy formatting!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanlandry.com/2009/10/16/aligning-data-with-a-decimal-point-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

