<?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>CSS Tutorials and CSS Articles &#187; CSS Align</title>
	<atom:link href="http://www.cssmaster.co.uk/tag/css-align/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cssmaster.co.uk</link>
	<description>CSS tutorials and articles</description>
	<lastBuildDate>Tue, 02 Feb 2010 01:43:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Align Using Margin</title>
		<link>http://www.cssmaster.co.uk/css-align-using-margin</link>
		<comments>http://www.cssmaster.co.uk/css-align-using-margin#comments</comments>
		<pubDate>Fri, 29 Jan 2010 00:14:00 +0000</pubDate>
		<dc:creator>CSS Master</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>
		<category><![CDATA[CSS Align]]></category>
		<category><![CDATA[CSS Margin]]></category>

		<guid isPermaLink="false">http://www.cssmaster.co.uk/?p=90</guid>
		<description><![CDATA[You will often want to center align a block element (such as a div).  Personally I find the best way to do this is to use CSS Align Using Margin.  
Setting a margin to auto will try and force the element to the opposite side.  So, if you set both left and [...]]]></description>
			<content:encoded><![CDATA[<p>You will often want to center align a block element (such as a div).  Personally I find the best way to do this is to use <strong>CSS Align Using Margin</strong>.  </p>
<p>Setting a margin to auto will try and force the element to the opposite side.  So, if you set both left and right margins to auto, the browser will put the browser in center.</p>
<p>Let&#8217;s take a look at the follow example CSS code, to be applied to a block element like a div:<br />
<code><br />
.centerme{<br />
&nbsp;&nbsp;width:100px;<br />
&nbsp;&nbsp;margin-left:auto;<br />
&nbsp;&nbsp;margin-right:auto;<br />
}<br />
</code><br />
It is very important you set a width on the element.  You cannot center align something that takes up the full width of it&#8217;s container.  Imagine a room full of water, you cannot make the water go into the center of the room without forcing its sides in.  Bit of an odd analogy, but you get the meaning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cssmaster.co.uk/css-align-using-margin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

