<?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>Wowebmaster.com &#187; Css</title>
	<atom:link href="http://www.wowebmaster.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wowebmaster.com</link>
	<description>World of Webmaster: Sharing Experiences</description>
	<lastBuildDate>Sun, 23 Jan 2011 23:40:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Centering Web Page</title>
		<link>http://www.wowebmaster.com/css/css-centering-web-page/</link>
		<comments>http://www.wowebmaster.com/css/css-centering-web-page/#comments</comments>
		<pubDate>Sat, 02 May 2009 20:40:02 +0000</pubDate>
		<dc:creator>sguler</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.wowebmaster.com/?p=93</guid>
		<description><![CDATA[A quick trick to center your web site horizontally by using CSS]]></description>
			<content:encoded><![CDATA[<p>If you are new to CSS, you may be having diffucult to center web pages horizontally. I remember I was trying to center the page by defining extra divs with align:center attributes. That is not necessary though. Just adding a margin attribute which is set to &#8220;auto&#8221; for left and right would do the trich to center your pages. See the following css code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p93code1'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p931"><td class="code" id="p93code1"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS Document */</span>
body <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span> <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/*For IE6 Shenanigans*/</span>
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">907px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span> <span style="color: #00AA00;">&#125;</span> <span style="color: #808080; font-style: italic;">/* Centering Page */</span></pre></td></tr></table></div>

<p>You see the margin attribute ? By setting it to auto, the margins to the left and right will be automatic, which means your page will be centered. Of course, you have to specify a width for your div, otherwise the browser will not be able to calculate the margins to the left and right. The following shows the HTML code.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p93code2'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p932"><td class="code" id="p93code2"><pre class="html" style="font-family:monospace;">&lt;!--CTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt--&gt;
&lt;div id=&quot;content&quot;&gt;
&nbsp;
&lt;!-- ALL THE CONTENT GOES HERE --&gt;&lt;/div&gt;</pre></td></tr></table></div>

<p>That&#8217;s it. Enjoy.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?&amp;linkurl=http%3A%2F%2Fwww.wowebmaster.com%2Fcss%2Fcss-centering-web-page%2F&amp;linkname=CSS%20Centering%20Web%20Page"><img src="http://www.wowebmaster.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.wowebmaster.com/css/css-centering-web-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

