<?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>thought snippets &#187; html</title>
	<atom:link href="http://blog.u-blue.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.u-blue.com</link>
	<description>a little bit of everything</description>
	<lastBuildDate>Tue, 08 Nov 2011 03:42:46 +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>from table to div</title>
		<link>http://blog.u-blue.com/en/2009/05/11/from-table-to-div/</link>
		<comments>http://blog.u-blue.com/en/2009/05/11/from-table-to-div/#comments</comments>
		<pubDate>Mon, 11 May 2009 07:34:40 +0000</pubDate>
		<dc:creator>nice</dc:creator>
				<category><![CDATA[webdev]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.u-blue.com/?p=96</guid>
		<description><![CDATA[An easy way to change your html layout from table to css/div for those who still using &#8220;old school html table layout&#8221; First, let&#8217;s look at the table: HTML code This is Header Main Menu-Menu1 Content goes here!This is content! Looks simple and familiar enough, but is it the best? How about we change it ]]></description>
			<content:encoded><![CDATA[<p>An easy way to change your html layout from table to css/div for those who still using &#8220;old school html table layout&#8221;</p>
<p>First, let&#8217;s look at the table:<br />
<div id="attachment_109" class="wp-caption alignnone" style="width: 379px"><a href="http://blog.u-blue.com/wp-content/uploads/2010/01/table1.png"><img src="http://blog.u-blue.com/wp-content/uploads/2010/01/table1.png" alt="" title="table" width="369" height="83" class="size-full wp-image-109" /></a><p class="wp-caption-text">Table Layout</p></div><br />
HTML code</p>
<pre class="brush:xml">
<table width="350" align="center">
<tbody>
<tr>
<td colspan="2" align="center"  bgcolor="#eeeeee">
This is Header
</td>
</tr>
<tr>
<td width="100" align="left" valign="top"  bgcolor="#999999">
Main Menu<br/>-Menu1
</td>
<td align="left" valign="top"  bgcolor="#cccccc">
Content goes here!<br/>This is content!
</td>
</tr>
</tbody>
</table>
</pre>
<p>Looks simple and familiar enough, but is it the best? How about we change it into css/div layout.</p>
<p><span id="more-96"></span><br />
The result:<br />
<div id="attachment_110" class="wp-caption alignnone" style="width: 380px"><a href="http://blog.u-blue.com/wp-content/uploads/2010/01/div.png"><img src="http://blog.u-blue.com/wp-content/uploads/2010/01/div.png" alt="" title="div" width="370" height="70" class="size-full wp-image-110" /></a><p class="wp-caption-text">Css Div Layout</p></div><br />
It looks the same as table, now let&#8217;s see the code.</p>
<p>HTML:</p>
<pre class="brush:xml">
<div id="container">
<div id="header">This is Header</div>
<div id="menu">Main Menu<br/>-Menu1</div>
<div id="content">Content goes here!<br/>This is content!</div>
</div>
</pre>
<p>CSS:</p>
<pre class="brush:css">
div#container{
	width:350px;
	margin:0 auto;
	background:#cccccc;
}
div#header{
	text-align:center;
	background: #eeeeee;
}
div#menu{
	width:100px;
	float:left;
	background: #999999;
}
div#content{
	width:250px;
	float:left;
	background: #cccccc;
}
</pre>
<p>Not as painful as you think? Now we combine them together.</p>
<ol>
<li>Put css code under style tag in HTML head
<pre class="brush:xml">
<style type="text/css">...</style>
</pre>
</li>
<li> Separate css code into .css file and create a like to it using tag
<pre class="brush:xml">
<link rel='stylesheet' href='file.css' type='text/css' media='all' /></pre>
</li>
</ol>
<p>That&#8217;s it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.u-blue.com/en/2009/05/11/from-table-to-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

