<?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>Ladysign Dev Blog &#187; float layout</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/float-layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS 2 floating columns and footer</title>
		<link>http://www.ladysign-apps.com/blog/code/css/css-2-floating-columns-and-footer/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/css-2-floating-columns-and-footer/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 14:31:52 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[crossbrowsers]]></category>
		<category><![CDATA[div layout]]></category>
		<category><![CDATA[float layout]]></category>
		<category><![CDATA[overflow problems]]></category>
		<category><![CDATA[w3c guidelines]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=239</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>I think every webdeveloper who is developing websites according the W3C guidelines, is experiencing the crossbrowser div [......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/css/css-2-floating-columns-and-footer/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>I think every webdeveloper who is developing websites according the W3C guidelines, is experiencing the crossbrowser div problem: floating div columns.</p>
<p>I agree, using html tables is pretty easy. But tables are there for displaying data in a table, not for designing your webpage!</p>
<p>The nasty thing about using div blocks, is when you are creating<br />
both div columns, for Firefox and Internet Explorer multiple problems will occur.<br />
Problems like, both columns are displayed under each other, instead of next each other. Or problems like the text breaks through the page footer. (overflow problem).</p>
<p>If you know what to do, it&#8217;s not that hard to create a nice layout.<br />
Check my code for a 2 column page, with a footer:</p>
<pre class="brush: jscript; title: ;">
- - - - - - - - - - - -
- columnX - - columnY -
- columnX - - columnY -
- columnX - - columnY -
- columnX - - columnY -
- - - - - - - - - - - -
-        Footer       -
- - - - - - - - - - - -
</pre>
<pre class="brush: xml; title: ;">
&lt;div id=&quot;wrapper&quot;&gt;
   &lt;div id=&quot;columnX&quot;&gt;&lt;/div&gt;
   &lt;div id=&quot;columnY&quot;&gt;&lt;/div&gt;
   &lt;div id=&quot;footer&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<pre class="brush: css; title: ;">
//start designing from x=0; y=0; point.
* { margin: 0; padding: 0; }

// Don not break the page when the content gets bigger
// set an overflow.
#wrapper {
 height: 100%;
 width: 100%;
 overflow: auto;
}

//You need to define a width, and set a left float.
#columnX{
  width: 650px;
  float: left;
}

//You need to define a width, and set a left float.
#columnY{
  width: 350px;
  float: right;
}

//Clear both column floats.
//Give the footer a min top margin, with the same value as
//the height, so the page will be always after the 2 columns.
#footer{
  height: 50px;
  width: 1000px;
  display: block;
  margin-top: -50px;
  clear: both;
}
</pre>
<p>So you&#8217;ll see, that did the trick.<br />
Now when you want your layout centered in the middle of the screen,<br />
you can use the following trick:</p>
<p>Add into the wrapper the following properties:</p>
<pre class="brush: css; title: ;">
margin: 0 auto;
</pre>
<p>The &#8220;auto&#8221; value sets the page in the horizontal center of the screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/css-2-floating-columns-and-footer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

