<?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>Rich Bui &#187; CSS</title>
	<atom:link href="http://richbui.com/tag/css-web_architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://richbui.com</link>
	<description>Welcome to my website.</description>
	<lastBuildDate>Mon, 19 Sep 2011 15:23:49 +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>WordPress How To Break Content Into Two Columns</title>
		<link>http://richbui.com/2010/01/01/wordpress-how-to-break-content-into-two-columns/</link>
		<comments>http://richbui.com/2010/01/01/wordpress-how-to-break-content-into-two-columns/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 15:51:22 +0000</pubDate>
		<dc:creator>Richard Bui</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Allan Cole]]></category>
		<category><![CDATA[Basic Maths]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Khoi Vinh]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shortcode]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WordPress Multi-User]]></category>
		<category><![CDATA[WPMU]]></category>

		<guid isPermaLink="false">http://bui4ever.com/?p=3271</guid>
		<description><![CDATA[So you want to design a WordPress theme or modify an existing theme to have your Post content to display as two columns much like printed newspapers and magazines? Well here&#8217;s an ingenious idea I learned from the Khoi Vinh&#8217;s and Allan Cole&#8217;s Basic Maths WordPress theme on how to do that. The beauty of [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to design a WordPress theme or modify an existing theme to have your Post content to display as two columns much like printed newspapers and magazines? Well here&#8217;s an ingenious idea I learned from the <a href="http://subtraction.com">Khoi Vinh&#8217;s</a> and <a href="http://fthrwght.com/">Allan Cole&#8217;s</a> <a href="http://basicmaths.subtraction.com/demo/">Basic Maths</a> WordPress theme on how to do that. The beauty of this technique is that no JavaScript is required and everything is processed through WordPress and PHP so nothing can get blocked by security settings on a visitor&#8217;s browsers. This method also solves the problem with blogs that have non-technical writers who aren&#8217;t accustomed to using the HTML tab in the Post Editor or aren&#8217;t familiar with HTML markup and it allows writers to just write. So how do we do this:</p>
<p><img class="alignnone size-large wp-image-3273" src="http://bui4ever.com/files/2009/12/basic-maths-wordpress-theme-2-column-sample-725x366.jpg" alt="basic-maths-wordpress-theme-2-column-sample" width="725" height="366" /></p>
<h3>Directions</h3>
<p>You will need a <em>functions.php</em> file in the theme template folder. If it already exists, open it. Otherwise, open you&#8217;re favorite HTML editor (I use <a href="http://www.emeraldeditor.com/">Emerald Editor</a> for the PC and <a href="http://www.barebones.com/products/TextWrangler/">TextWrangler</a> for the Mac) and save the blank file as <em>functions.php</em> inside the WordPress theme template folder.</p>
<p>Open up the <em>functions.php</em> file and paste the code below anywhere inside the file. Be sure that you don&#8217;t accidentally place this function inside another function or you&#8217;ll get a blank screen when trying to load your website. If you&#8217;re new to the <em>functions.php</em> file, it may take some trial and error to get this right.</p>
<p>[sourcecode language="PHP"]<br />
//	Page Paragraph column short code (http://basicmaths.subtraction.com/demo/)<br />
//	Right<br />
function basic_rightcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;rightcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;rightcolumn&quot;, &quot;basic_rightcolumn&quot;);</p>
<p>//	Top<br />
function basic_topcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;topcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;topcolumn&quot;, &quot;basic_topcolumn&quot;);</p>
<p>//	Left<br />
function basic_leftcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;leftcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;leftcolumn&quot;, &quot;basic_leftcolumn&quot;);<br />
[/sourcecode]</p>
<p>So what does all of this code do exactly? Let&#8217;s look at each part of code individually and the how to use it when writing Posts or Pages.</p>
<p>The first part of code:</p>
<p>[sourcecode language="PHP"]<br />
//	Right<br />
function basic_rightcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;rightcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;rightcolumn&quot;, &quot;basic_rightcolumn&quot;);<br />
[/sourcecode]</p>
<p>sets up a new WordPress Shortcode, <code>[rightcolumn][/rightcolumn]</code>, that you can use in your Posts and Pages. So when you write a Post or Page and you enclose some text in the Shortcode, that will cause WordPress to wrap your text in HTML markup. For example, if I was to write:</p>
<pre>[rightcolumn]This should appear in the right column.[/rightcolumn]</pre>
<p>and then Publish the Post, looking at the source code of the published page, I should see:</p>
<pre>&lt;div class="rightcolumn"&gt;&lt;p&gt;This should appear in the right column.&lt;/p&gt;&lt;/div&gt;</pre>
<p>The second part of code:</p>
<p>[sourcecode language="PHP"]<br />
//	Top<br />
function basic_topcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;topcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;topcolumn&quot;, &quot;basic_topcolumn&quot;);<br />
[/sourcecode]</p>
<p>sets up another new WordPress Shortcode,<code>[topcolumn][/topcolumn]</code>, that maybe necessary depending on how your theme is laid out. The biggest advantage I see with the <code>[topcolumn]</code> is that you can use it right after the <code>[leftcolumn]</code> and <code>[rightcolumn]</code> to fix any CSS float issues.</p>
<p>The final part of code:</p>
<p>[sourcecode language="PHP"]<br />
//	Left<br />
function basic_leftcolumn($atts, $content = null) {<br />
	return &#8216;&lt;div class=&quot;&lt;span class=&quot;&gt;leftcolumn&quot;&gt;&#8217; . $content . &#8216;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode(&quot;leftcolumn&quot;, &quot;basic_leftcolumn&quot;);<br />
[/sourcecode]</p>
<p>adds <code>&lt;div class="leftcolumn"&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</code> to whatever is enclosed in the <code>[leftcolumn][/leftcolumn]</code> Shortcode.</p>
<p>Now you need to style those divs appropriately in order for the two columns to appear. This is what I use in my style sheet, but you mileage may vary:</p>
<p>[sourcecode language="CSS"]<br />
.entry .leftcolumn, .entry .rightcolumn {width: 50%; }<br />
.entry .leftcolumn {float: left;  }<br />
.entry .rightcolumn {float: right; }<br />
.entry .leftcolumn p {padding-right: 0.5em; }<br />
.entry .rightcolumn p {padding-left: 0.5em; }<br />
.entry .topcolumn {clear: both; }<br />
[/sourcecode]</p>
<p>Now to use this, you start a new Post or you can edit an existing Post, and decide where you want the 2-columns to appear and write:</p>
<pre>[leftcolumn]This is the stuff that I'll be putting in my left column.[/leftcolumn]
[rightcolumn]This is the stuff that will go into the right column. Isn't it pretty?[/rightcolumn]
[topcolumn]This will span the entire width and be a normal one-column paragraph.[/topcolumn]</pre>
<p>With the Shortcodes, you can put them next to each other or do a hard-return, it doesn&#8217;t matter. In actuality, the WordPress Visual Editor will probably move it all to one line. You can also put <code>[rightcolumn]</code> before the <code>[leftcolumn]</code> as the right column will always be right so long as you have the CSS correct.</p>
<p><img class="alignnone size-large wp-image-3322" src="http://bui4ever.com/files/2009/12/wordpress-two-column-post-visual-editor-sample-725x173.jpg" alt="wordpress-two-column-post-visual-editor-sample" width="725" height="173" /></p>
<p>The only thing you can&#8217;t do is something like this:</p>
<pre>[leftcolumn]This is the stuff that I'll be putting in my left column.[/leftcolumn]
[topcolumn]This will span the entire width and be a normal one-column paragraph.[/topcolumn]
[rightcolumn]This is the stuff that will go into the right column. Isn't it pretty?[/rightcolumn]</pre>
<p>as you&#8217;ll have some weird styling errors.</p>
<h3>Example</h3>
<p><div class="leftcolumn"><p>It wouldn&#8217;t be any good without a sample to show right? So if you copied the code and put it in the <em>functions.php</em> file correctly, then in the WordPress Post Editor, you should be able to use the new Shortcodes to create a two-column post article. Also don&#8217;t forget that you need to style the <em>divs</em> in-order for this to work properly.</p></div>  <div class="rightcolumn"><p>If you notice that you still only have one-column, but no errors, check your source code for the chunk of code to see if it the Shortcode is being properly called. If it is, that means you&#8217;re missing the style information in the style sheet.</p></div> <div class="topcolumn"><p>Here&#8217;s a wide column that returns to &#8220;normal&#8221; and spans the entire width. You don&#8217;t necessarily need to use the <code>[topcolumn]</code> Shortcode, but if you notice that your having design float issues, then you need to use the<br />
<code>[topcolumn]</code> Shortcode on the paragraph immediately following the two columns. Make sure you have <code>clear: both;</code> entered into your style sheet under<code>.topcolumn</code>.</p>
<p>I would recommend doing this as good practice anyways; especially if one column is longer than the other column.</p></div> </p>
<h3>Conclusion</h3>
<p>There are a number of ways you can accomplish two-column post layouts. There a number of <a href="http://plugins.jquery.com/project/columnize">jQuery</a> <a href="http://www.systemantics.net/en/columnize">techniques</a> including this <a href="http://welcome.totheinter.net/columnizer-jquery-plugin/">WordPress plugin</a> that accomplishes the task but I&#8217;m a big fan of less. The less plugins you have to use, the faster your website will load. Also you want to make it as easy as possible for non-techie writers to be able to implement easily. One of the hardest part is to have the non-techie writer try to use the HTML Editor, see a garble of code, mess around and everything is screwed up. Extreme case, but it happens. With the use of WordPress Shortcodes, they can easily implement the feature from the Visual Editor and focus on writing.</p>
<p>Thank you to the Basic Maths WordPress Theme for the very useful code.</p>
<p><strong>UPDATE (2010-05-17):</strong> <a href="http://www.wprecipes.com/wordpress-hack-automatically-output-the-content-in-two-columns">Here&#8217;s a trick</a> by <a href="http://www.wprecipes.com/">WPRecipes.com</a> on how to automatically output content into two columns using the functions.php for those who are looking for a method that doesn&#8217;t require users to remember code.</p>
]]></content:encoded>
			<wfw:commentRss>http://richbui.com/2010/01/01/wordpress-how-to-break-content-into-two-columns/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Today&#8217;s Links of Interest</title>
		<link>http://richbui.com/2008/09/04/todays-links-of-interest/</link>
		<comments>http://richbui.com/2008/09/04/todays-links-of-interest/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 00:32:21 +0000</pubDate>
		<dc:creator>Richard Bui</dc:creator>
				<category><![CDATA[Useful Things]]></category>
		<category><![CDATA[3nhanced.com]]></category>
		<category><![CDATA[Adobe Photoshop]]></category>
		<category><![CDATA[Blogohblog.com]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Noupe.com]]></category>
		<category><![CDATA[Prelovac.com]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://bui4ever.com/?p=1961</guid>
		<description><![CDATA[I keep visiting all these cool websites, each with useful techniques or tips and tricks or even just a cool design, and I bookmark them, but I never visit them again. I then look in my bookmarks to look for something specific and find I have a gabillion bookmarks that make no sense to me [...]]]></description>
			<content:encoded><![CDATA[<p>I keep visiting all these cool websites, each with useful techniques or tips and tricks or even just a cool design, and I bookmark them, but I never visit them again. I then look in my bookmarks to look for something specific and find I have a gabillion bookmarks that make no sense to me because they&#8217;re all just website names. I remember why I bookmarked the sites when I bookmarked them, but months and sometimes years later, I can&#8217;t recall for the life of me why I bookmarked that site.<span id="more-1961"></span></p>
<p>What works for me is a list with the reason why I bookmarked something, I guess something kinda like what <a href="http://delicious.com">Delicious</a> offers, but I think it&#8217;s more useful for me on my own site because I can do more than just add snippets of text. So starting today, I created a new category, Useful Things as a place to stick all the stuff such as links or pics of things I might need later.</p>
<h3>3nhanced.com &#8211; Photoshop, CSS, JavaScript tips and tricks</h3>
<p>A cool website by Jonathan Snook that has a lot of cool tips and tricks for Adobe Photoshop. I originally came here looking for WordPress badges for my website, and found Jonathan&#8217;s post on <a href="http://3nhanced.com/photoshop/how-to-make-a-badass-wordpress-logo/">How To Make A Badass WordPress Logo</a>. I was also further enticed by his cool WordPress theme and was specifically drawn in on how he did post thumbnails. It doesn&#8217;t look like it&#8217;s been updated recently and there isn&#8217;t many posts, but it&#8217;s still worth bookmarking.</p>
<p style="text-align: center"><a href="http://bui4ever.com/files/2008/09/3nhanced-com.jpg"><img class="aligncenter size-medium wp-image-1962" src="http://bui4ever.com/files/2008/09/3nhanced-com-640x437.jpg" alt="" width="384" height="262" /></a></p>
<h3>Prelovac.com &#8211; WordPress Plugin: Snazzy Archives</h3>
<p>Vladimir Prelovac has been on a roll with writing great WordPress plugins, but the one plugin that really caught my eye is his cool fancy <a href="http://www.prelovac.com/vladimir/wordpress-plugins/snazzy-archives">Snazzy Archives</a>. It&#8217;s one of the few plugins that I can confidently say I would pay for. The concept is wonderful and it is visually stunning. Here&#8217;s a <a href="http://www.prelovac.com/vladimir/archive-spec">live demo</a>. It also have various configurations that you can use.</p>
<p style="text-align: center"><a href="http://bui4ever.com/files/2008/09/snazzy-screenshot-1.png"><img class="aligncenter size-medium wp-image-1964" src="http://bui4ever.com/files/2008/09/snazzy-screenshot-1.png" alt="" width="364" height="239" /></a></p>
<p>For those that are interested, Vladimir is also responsible for the <a href="http://www.prelovac.com/vladimir/wordpress-plugins/live-blogroll">Live Blogroll</a>, <a href="http://www.prelovac.com/vladimir/wordpress-plugins/wp-wall">WP Wall</a>, and <a href="http://www.prelovac.com/vladimir/wordpress-plugins/theme-test-drive">Theme Test Drive</a>. He&#8217;s also the creator of the Amazing Grace WordPress theme that <a href="http://ocaoimh.ie/">Donncha</a> is currently using on his site.</p>
<h3>Blogohblog.com &#8211; 10 WordPress Hacks to Make Your Life Easy</h3>
<p>I originally stumbled upon <a href="http://www.blogohblog.com/10-wordpress-hacks-to-make-your-life-easy/">this link</a> from <a href="http://weblogtoolscollection.com/archives/2008/08/28/wordpress-hacks-21-tips-to-make-you-smile/">WeblogToolsCollection.com</a> and found it to be a great post. <a href="http://www.blogohblog.com/about/">Jai Nischal Verma</a> lists 10 very useful code hacks for WordPress theme developers. The topics covered are:</p>
<ol>
<li>Displaying Gravatars in comments &#8211; specifically the code and CSS necessary to have Gravatars appear in the comments section of your theme</li>
<li>Image Gallery in WordPress &#8211; the lines of code with the CSS so that you can take advantage of WordPress 2.5&#8242;s new built-in Gallery</li>
<li>Adding a &#8220;Subscribe to feed&#8221; message after every post &#8211; a simple way to remind readers to subscribe to your RSS feed</li>
<li>Displaying Twitter messages on your blog</li>
<li>Displaying Authors&#8217; Bio</li>
<li>Categories drop down</li>
<li>Archives drop down</li>
<li>Adding 125&#215;125 Ads to your sidebar</li>
<li>Displaying most commented (popular) posts &#8211; this is a way to display the most commented posts without a plugin, but rather the code is directly integrated into the theme</li>
<li>Adding a Print Button to your posts &#8211; people sometimes forget to do this for their themes. Make it easy for people to print out the useful information on your website! Don&#8217;t forget to style for print also.</li>
</ol>
<h3>Noupe.com &#8211; Most Desired WordPress Hacks: 11 Common Requests and Fixes</h3>
<p>This was the <a href="http://www.noupe.com/wordpress/most-desired-wordpress-hacks-11-common-requests-and-fixes.html">first link</a> in the same WeblogToolsCollection.com article above that is also incredible useful for WordPress theme developers. It&#8217;s already got 100 Diggs and 90 comments, so it&#8217;s a worthwhile bookmark. The eleven topics covered are:</p>
<ol>
<li>Using Custom Fields to Display Post Thumbnails</li>
<li>Avoiding Duplicate Content &#8211; This is important, not only for SEO, but because there are times you need to run two loops such as the case with Featured posts.</li>
<li>Login Box in your sidebar</li>
<li>Creating a menu Showing Certain Categories</li>
<li>Display Categories in a Dropdown box</li>
<li>Most Wanted Posts and Categories hacks</li>
<li>Post Author Related Solutions</li>
</ol>
<p>I also like Noupe&#8217;s WordPress theme also. It&#8217;s nicely designed with nice colors.</p>
<p style="text-align: center"><a href="http://bui4ever.com/files/2008/09/noupe.jpg"><img class="aligncenter size-medium wp-image-1967" src="http://bui4ever.com/files/2008/09/noupe-640x387.jpg" alt="" width="448" height="271" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://richbui.com/2008/09/04/todays-links-of-interest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

