<?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>DemiLane &#187; CSS</title>
	<atom:link href="http://demilane.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://demilane.com</link>
	<description>Pages of Rogelio Calamaya</description>
	<lastBuildDate>Sun, 05 Feb 2012 01:43:07 +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>Absolute and Relative Positioning</title>
		<link>http://demilane.com/absolute-and-relative-positioning/</link>
		<comments>http://demilane.com/absolute-and-relative-positioning/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 01:36:36 +0000</pubDate>
		<dc:creator>Rogelio</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[layout]]></category>

		<guid isPermaLink="false">http://blog.demilane.com/?p=67</guid>
		<description><![CDATA[With the Absolute position you can position the page element anywhere in the parent element. You can control them the way you want. And much [...]]]></description>
			<content:encoded><![CDATA[<p>With the <strong>Absolute position</strong> you can position the page element anywhere in the parent element. You can control them the way you want. And much more control if the parent element is <strong>relatively positioned</strong>.</p>
<p>Let&#8217;s just assume that the box with dashed border is your browser window. This is what is looks like if the position on the parent element is set to default:</p>
<div class="img_box m_shadow"><img class="aligncenter size-full wp-image-95" title="position_static" src="http://demilane.com/wp-content/uploads/2008/12/position_static.jpg" alt="Image 1" width="450" height="350" /></div>
<p>And this, if the position on parent element is set to <strong>relative</strong>:</p>
<div class="img_box m_shadow"><img class="size-full wp-image-99 aligncenter" title="position_relative" src="http://demilane.com/wp-content/uploads/2008/12/position_relative.jpg" alt="Image 2" width="450" height="350" /></div>
<p>The explanation to the images above is that when the element is set to absolute position, it position itself with respect to the parent element(<em>Image 2</em>). But when the parent element is not relatively position, it position itself to the body element ignoring the parent element(<em>Image 1</em>).</p>
<p>So what happens when the <strong>#child_element_1</strong> is set to default position(<em>static</em>) and the sibling is set to absolute position? See the image below:</p>
<div class="img_box m_shadow"><img class="size-full wp-image-101 aligncenter" title="position_problem" src="http://demilane.com/wp-content/uploads/2008/12/position_problem.jpg" alt="Image 3" width="450" height="350" /></div>
<p>As you can see in the image above, while the <strong>#child_element_1</strong>&#8216;s height is increasing the <strong>#parent_element</strong>&#8216;s height will increase too but not with the <strong>#child_element_2</strong>&#8216;s height. It&#8217;s because when the element is set to absolute position, that element is remove from the normal flow.</p>
<p>Hope this will help. Cheers!</p>
<p>Related posts:<ol>
<li><a href='http://demilane.com/toggle-grid-in-blueprint-css/' rel='bookmark' title='Toggle Grid in Blueprint CSS'>Toggle Grid in Blueprint CSS</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://demilane.com/absolute-and-relative-positioning/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

