<?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>nPath Ltd. &#187; CSS</title>
	<atom:link href="http://www.npathweb.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.npathweb.com</link>
	<description>Web Development Blog</description>
	<lastBuildDate>Tue, 10 Jan 2012 02:22:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Use Css to center a div</title>
		<link>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/</link>
		<comments>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:57:52 +0000</pubDate>
		<dc:creator>B.Harding</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.npathweb.com/blog/?p=16</guid>
		<description><![CDATA[Using tables to layout a page is considered outdated. The &#8220;new&#8221; way to do it is with Div tags a alot of Cascading Style Sheets. To center a table is easy. You just set align=&#8221;center&#8221;. But what about when using the new way? When you want to center a div in the middle of the [...]]]></description>
			<content:encoded><![CDATA[<p>Using tables to layout a page is considered outdated. The &#8220;new&#8221; way to do it is with Div tags a alot of Cascading Style Sheets.</p>
<p>To center a table is easy. You just set align=&#8221;center&#8221;. But what about when using the new way?</p>
<p>When you want to center a div in the middle of the page use either a style or a css class to set the following attibutes:</p>
<p>width: a fixed width;<br />
margin-right:auto;<br />
margin-left:auto;</p>
<p><em>Note this tip is only for horizontal alignment. Centering vertically will be discussed in a future post.</em></p>
<p>example:</p>
<p><span style="font-family: Courier New;">&lt;div style=&#8221;width:600px; margin-left:auto; margin-right:auto;&#8221;&gt;</span></p>
<p><span style="font-family: Courier New;">Hello Middle.</span></p>
<p><span style="font-family: Courier New;">&lt;/div&gt;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npathweb.com/2009/02/05/use-css-to-center-a-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

