<?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>Eric Ditmer &#187; HTML</title>
	<atom:link href="http://www.ericditmer.com/category/html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ericditmer.com</link>
	<description>ericditmer.com</description>
	<lastBuildDate>Tue, 08 Nov 2011 14:35:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Center an Element Horizontally and Vertically</title>
		<link>http://www.ericditmer.com/center-element-horizontally-vertically</link>
		<comments>http://www.ericditmer.com/center-element-horizontally-vertically#comments</comments>
		<pubDate>Sat, 27 Aug 2011 04:49:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.ericditmer.com/?p=202</guid>
		<description><![CDATA[This one is an oldie but a goody. Using basic HTML/CSS we can position an element directly in the center of the page. Here are the steps to perfectly centering an element: Absolutely position the element Position the element 50% from the top, 50% from the left Define the width/height of the element you wish [...]]]></description>
			<content:encoded><![CDATA[<p>This one is an oldie but a goody. Using basic HTML/CSS we can position an element directly in the center of the page. Here are the steps to perfectly centering an element:<span id="more-202"></span></p>
<ol>
<li>Absolutely position the element</li>
<li>Position the element 50% from the top, 50% from the left</li>
<li>Define the width/height of the element you wish to center</li>
<li>Compensate for the image&#8217;s width and height by applying two negative margins: A negative left margin set to half of the image&#8217;s width, and a negative top margin set to half of the image&#8217;s height.</li>
</ol>
<pre name="code" class="css">
#center-me {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 600px;
	height: 260px;
	margin-left: -300px;
	margin-top: -130px;
	background: url('../images/holy-crap-centered.gif') no-repeat;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ericditmer.com/center-element-horizontally-vertically/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

