<?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/"
	>

<channel>
	<title>Widget Pi &#187; Snippets of Code</title>
	<atom:link href="http://wpmupremium.com/widgetpi/category/snippets-of-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpmupremium.com/widgetpi</link>
	<description>Tracking Gadgets &#38; Gizmos Since 1869</description>
	<pubDate>Wed, 26 Aug 2009 08:44:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Use CSS to Absolutely Center Align a DIV</title>
		<link>http://wpmupremium.com/widgetpi/using-css-only-to-absolutely-center-align-a-div/</link>
		<comments>http://wpmupremium.com/widgetpi/using-css-only-to-absolutely-center-align-a-div/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 05:35:55 +0000</pubDate>
		<dc:creator>WPMUP TEAM</dc:creator>
		
		<category><![CDATA[Snippets of Code]]></category>

		<guid isPermaLink="false">http://blog.widgetpi.com/using-css-only-to-absolutely-center-align-a-div/</guid>
		<description><![CDATA[For those of you looking for the easiest way to absolutely center align a DIV using CSS only, and avoiding all of those really messy tables, whilst also wanting to fluidity in the design, please use the following code...]]></description>
			<content:encoded><![CDATA[<p align="justify">For those of you looking for the easiest way to absolutely center align a DIV  using CSS only, and avoiding all of those really messy tables, whilst also wanting to fluidity in the design, please use the  following code:</p>
<div class="box-code">#container {<br />
position: absolute;<br />
left: 50%;<br />
top: 50%;<br />
width:560px;<br />
height:380px;<br />
margin-left: -280px; /* MUST UPDATE TO MATCH HALF THE WIDTH  */<br />
margin-top: -190px;   /* MUST UPDATE TO MATCH HALF THE HEIGHT */<br />
} </div>
<p align="justify">Please note that if you change the width and height of the DIV, you must also change the margin left and top so that they exactly match half the size of the height and width. This can be avoided using percentages, but Internet Explorer does not accept percentages in height values, so to be truly cross-browser compatible, you need to do things manually for now, that is; until our up-coming DIVx widget has finished being baked!</p>
]]></content:encoded>
			<wfw:commentRss>http://wpmupremium.com/widgetpi/using-css-only-to-absolutely-center-align-a-div/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
