<?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>Juixe Techknow &#187; CSS</title>
	<atom:link href="http://juixe.com/techknow/index.php/category/techknow/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://juixe.com/techknow</link>
	<description>Break Coders Block!</description>
	<lastBuildDate>Mon, 21 May 2012 16:01:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>TechKnow Year In Review 2009</title>
		<link>http://juixe.com/techknow/index.php/2009/12/31/techknow-year-in-review-2009/</link>
		<comments>http://juixe.com/techknow/index.php/2009/12/31/techknow-year-in-review-2009/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 00:48:55 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TechKnow]]></category>
		<category><![CDATA[calacanis]]></category>
		<category><![CDATA[dhh]]></category>
		<category><![CDATA[griffon]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[quotes]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[tweet]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://juixe.com/techknow/?p=962</guid>
		<description><![CDATA[It is that time of year where we reflect on the accomplishments of the passing year and look forward to the one to come. Here is a window into the past year in technology through this year’s popular posts on TechKnow Juixe. Top Favorites Laws of Source Code and Software Development Repetative Recursion Technology and [...]]]></description>
			<content:encoded><![CDATA[<p>It is that time of year where we reflect on the accomplishments of the passing year and look forward to the one to come. Here is a window into the past year in technology through this year’s popular posts on <a href="http://juixe.com/techknow">TechKnow Juixe</a>.</p>
<p><b>Top Favorites</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2009/05/07/laws-of-source-code-and-software-development/">Laws of Source Code and Software Development</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/09/repetative-recursion/">Repetative Recursion</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/08/19/technology-and-politics/">Technology and Politics</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/29/being-a-better-rails-developer/">Being a Better Rails Developer</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/28/programming-memes/">Programming Memes</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/28/developers-perpetual-todo-list/">Developer&#8217;s Perpetual Todo List</a></li>
</ul>
<p><b>Fav Tutorial</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2009/05/11/the-anatomy-of-a-javascript-bookmarklet/">Anatomy of a JavaScript Bookmarklet</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/11/dynamically-create-html-elements-with-javascript/">Dynamically Create HTML Elements with JavaScript</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/06/09/grinding-griffon-the-setup/">Grinding Griffon</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/08/17/the-1kb-css-grid/">The 1KB CSS Grid</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/10/27/download-twitter-profile-images-using-ruby/">Download Twitter Profile Images Using Ruby</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/10/08/jamming-with-ruby-yaml/">Jamming with Ruby YAML</a></li>
</ul>
<p><b>Memorable Quotes</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2009/12/31/quotable-calacanis-2009/">Quotable Calacanis</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/11/25/quotable-dhh-2009/">Quotable DHH</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/11/18/favorite-programming-quotes-2009/">Favorite Programming Quotes 2009</a></li>
</ul>
<p><b>Twitter</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2009/01/12/twitter-ruby-gem/">Twitter Ruby Gem</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/02/11/twitter-business-model/">Twitter Business Model</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/04/26/the-three-laws-of-twitters/">The Three Laws of Twitters</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/26/twitcode/">Twitcode</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/08/22/songs-in-code/">Songs in Code</a></li>
</ul>
<p><b>Twitter Conversations</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2009/07/20/remote-debug-your-thinking-process/">Remote Debug Your Thinking Process</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/05/18/all-code-is-inherently-evil/">All Code is Inherently Evil</a></li>
<li><a href="http://juixe.com/techknow/index.php/2009/11/25/the-mayor-of-dead-space/">The Mayor of Dead Space</a></li>
</ul>
<p><b>Year in Review</b></p>
<ul>
<li><a href="http://juixe.com/techknow/index.php/2008/12/30/techknow-year-in-review-2008/">2008</a></li>
<li><a href="http://juixe.com/techknow/index.php/2007/12/11/techknow-year-in-review-2007/">2007</a></li>
<li><a href="http://juixe.com/techknow/index.php/2006/12/31/techknow-year-in-review-2006/">2006</a></li>
<li><a href="http://juixe.com/techknow/index.php/2005/12/27/techknow-year-in-review-2005/">2005</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2009/12/31/techknow-year-in-review-2009/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The 1Kb CSS Grid</title>
		<link>http://juixe.com/techknow/index.php/2009/08/17/the-1kb-css-grid/</link>
		<comments>http://juixe.com/techknow/index.php/2009/08/17/the-1kb-css-grid/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 06:13:11 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://juixe.com/techknow/?p=812</guid>
		<description><![CDATA[I&#8217;ve used a variety of layout techniques and technologies, from HTML tables to home grown CSS. I recently started using The 1Kb CSS Grid to layout my web content in a page. With The 1Kb CSS Grid you can specially design your grid CSS by selecting the number of columns, the column width and the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used a variety of layout techniques and technologies, from HTML tables to home grown CSS.  I recently started using <a href="http://www.1kbgrid.com/">The 1Kb CSS Grid</a> to layout my web content in a page.  With The 1Kb CSS Grid you can specially design your grid CSS by selecting the number of columns, the column width and the gutter width between columns.  The width of your grid will be calculated for you but just in case you care, the total width of the grid will be based on the following equation: (Number of Columns x Column Width) + (Number of Columns &#8211; 1) * Gutter With</p>
<div id="attachment_825" class="wp-caption aligncenter" style="width: 545px"><img src="http://juixe.com/techknow/wp-content/uploads/2009/08/1Kb-CSS-Grid-535x181.png" alt="1Kb CSS Grid" title="1Kb CSS Grid" width="535" height="181" class="size-large wp-image-825" /><p class="wp-caption-text">1Kb CSS Grid</p></div>
<p>For my requirements I found when using The 1Kb CSS Grid that I tend to get more flexibility when I use 12 columns at 60 pixel wide each column and a gutter of only 10 pixels.  The total grid width for this layout is 840px.  If you peek in the generated grid.css you will find, with our configuration, 12 grid classes, such as grid_1, grid_2, etc.  Think of grid_1 as a single column, and grid_2 as a one cell that spans two columns.  You can have any number of rows, but each row you only have 12 columns.  For example, you can have one grid_12, or three grid_4, or 12 grid_1 per row.  Lets see the HTML for a few rows and how they would end up looking.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;column grid_12&quot;&gt;12&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;column grid_6&quot;&gt;6&lt;/div&gt;
  &lt;div class=&quot;column grid_6&quot;&gt;6&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;column grid_1&quot;&gt;1&lt;/div&gt;
  &lt;div class=&quot;column grid_2&quot;&gt;2&lt;/div&gt;
  &lt;div class=&quot;column grid_4&quot;&gt;4&lt;/div&gt;
  &lt;div class=&quot;column grid_5&quot;&gt;5&lt;/div&gt;
&lt;/div&gt;
</pre>
<div id="attachment_827" class="wp-caption aligncenter" style="width: 545px"><img src="http://juixe.com/techknow/wp-content/uploads/2009/08/grid-layout-535x442.png" alt="Basic Grid Layout" title="grid-layout" width="535" height="442" class="size-large wp-image-827" /><p class="wp-caption-text">Basic Grid Layout</p></div>
<p>Notice that each row can have any number of grids, as long as the grid count adds up to 12.  You can also nest rows</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;row&quot;&gt;
  &lt;div class=&quot;column grid_8&quot;&gt;8
    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;column grid_4&quot;&gt;4&lt;/div&gt;
      &lt;div class=&quot;column grid_4&quot;&gt;4&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;column grid_4&quot;&gt;4&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>As a tip, just remember that the grid count in the nested row must add up to the parent/containing column grid count.  Below is a dramatization of what a CSS grid row with a nested row would look like.</p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2009/08/17/the-1kb-css-grid/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone Dev Camp</title>
		<link>http://juixe.com/techknow/index.php/2007/07/09/iphone-dev-camp/</link>
		<comments>http://juixe.com/techknow/index.php/2007/07/09/iphone-dev-camp/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 15:01:56 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2007/07/09/iphone-dev-camp/</guid>
		<description><![CDATA[iPhone Development The iPhone Dev Camp started on Saturday by a nice presentation by Chritopher Allen, a MacHack veteran, regarding what is known about the iPhone from a web developer&#8217;s perspective. What is known is that the iPhone uses web standards (HTML, XHTML, CSS, JavaScript, PDF and Quicktime). Web 2.0 best practices apply for the [...]]]></description>
			<content:encoded><![CDATA[<h3>iPhone Development</h3>
<p>The <a href="http://www.barcamp.org/iPhoneDevCamp">iPhone Dev Camp</a> started on Saturday by a nice presentation by <a href="http://www.iphonewebdev.com">Chritopher Allen</a>, a MacHack veteran, regarding what is known about the iPhone from a web developer&#8217;s perspective.  What is known is that the iPhone uses web standards (HTML, XHTML, CSS, JavaScript, PDF and Quicktime).  Web 2.0 best practices apply for the iPhone, such as the proper use and sepration of HTML, CSS, and JavaScript.  Christopher recommends avoiding the use of Flash, SVG, Java applets, embedded video, custom x.509 certificates, and framesets.  Christopher also states the the finger is not a mouse and you need to design accordingly with large enough buttons and links with plenty of space between each other.<br />
Fingers can do more than the traditional point and drag cursor such as double tap, touch and hold, one or two finger drag, flick, and pinch.</p>
<p>It might come as a surprise but many of JavaScript events don&#8217;t work, such as onscroll, onkeydown, onkeypress, onmousemove, etc.  Some web development recommendations for the iPhone are to use columns and small blocks in the layout, such as floating divs.  You should also use the tel: and mailto: protocols in links.  You can also integrate with Google Maps simply by adding your location search to maps.google.com/maps? URL.</p>
<p>The current activity on the the <a href="http://groups.google.com/group/iphonewebdev">iPhoneWebDev</a> Google Groups seems to be focused around iPhone specific development libraries, implementing the infamous back button, debugging JS, optimizing application for low bandwidth, and hacking the viewport.  There is also a series of <a href="http://barcamp.org/iPhoneDevCampOpenQuestions">open questions</a> such as, what level of support is there for the canvas tag?  What level of persistent storage is available, cookies?  The right questions will lead to the right answers.  I have also published a great list of available iPhone <a href="http://www.juixe.com/techknow/index.php/2007/07/06/top-15-iphone-web-development-resources/">development resources</a>.</p>
<p>Most of time at the iPhone Dev Camp was spent developing a collaborating for the hack-a-thon.  This was a working camp focused on developing some really cool applications on the iPhone.<br />
<span id="more-313"></span></p>
<h3>iPhone Dev Camp Hacks</h3>
<p><a href="http://www.telemoose.com/iphonedevcamp/">Telemoose</a> has a nice presentation for optimizing a web application for low bandwidth environments and the iPhone entitled Living on the EDGE.  He also has some helpful JavaScript functions for working on the iPhone.</p>
<p>Nearly 50 <a href="http://barcamp.org/iPhoneDevCampHackAThon">iPhone hacks</a> were developed at the iPhone Dev Camp.  I can safely say that about thirty percent of those hacks developed used <a href="http://code.google.com/p/iui/">iUI</a> and the iPhone <a href="http://www.joehewitt.com/files/iphone/navigation.html">liquid navigation</a>, both developed by Joe Hewitt.  Joe also has been busy phone phreaking the iPhone and had time to developed <a href="http://www.joehewitt.com/blog/firebug_for_iph.php">Firebug for iPhone</a>.</p>
<p>Some of my favorite made at iPhone Dev Camp hacks include <a href="http://www.xeodesign.com/tilt.html">Tilt</a> (the first ever motion controlled <b>iPhone game</b>), <a href="http://www.mxis.com/pickleview/">PickleView</a>, <a href="http://appmarks.com/site/">AppMarks</a>, and <a href="http://www.vinq.com/wegame/">Qix</a>.</p>
<h3>iPhone Dev Camp Pictures</h3>
<p><a href="http://www.flickr.com/photos/atow/746952135/">Hacking the Phone</a><br />
<a href="http://www.flickr.com/photos/alexmuse/748387563/">moPhaic co-developer</a><br />
<a href="http://www.flickr.com/photos/atow/751827739/">Sleeping MacBook</a><br />
<a href="http://www.flickr.com/photos/snackfight/749105076/">Chris Messina, iPhoneDevCamp co-organizer</a><br />
<a href="http://www.flickr.com/photos/atow/748792883/">Hard Core Hacker</a><br />
<a href="http://www.flickr.com/photos/scobleizer/744243747/">Tilt Paper Prototype</a><br />
<a href="http://www.flickr.com/photos/scobleizer/750677459/">iPeeps</a><br />
<a href="http://www.flickr.com/photos/atow/746949039/">In the Crowd</a><br />
<a href="http://www.flickr.com/photos/ari/744419010/in/photostream/">Microsoft Techie</a><br />
<a href="http://www.flickr.com/photos/atow/748853487/">Newton Dev Camp?</a><br />
<a href="http://www.flickr.com/photos/atow/751815885/">Joe Hewitt, Kent Bye, Felipe Ortiz</a><br />
<a href="http://www.flickr.com/photos/atow/746951291/">Hack this Phone</a><br />
<a href="http://www.flickr.com/photos/cookiecrook/749831549/">iPhone Zoolander</a><br />
<a href="http://www.flickr.com/photos/atow/747809004/">Option Shift K</a></p>
<p>Technorati Tags: <a href="http://technorati.com/tag/iui" rel="tag">iui</a>, <a href="http://technorati.com/tag/apple" rel="tag"> apple</a>, <a href="http://technorati.com/tag/iphone" rel="tag"> iphone</a>, <a href="http://technorati.com/tag/iphonedev" rel="tag"> iphonedev</a>, <a href="http://technorati.com/tag/iphonewebdev" rel="tag"> iphonewebdev</a>, <a href="http://technorati.com/tag/iphonedevcamp" rel="tag"> iphonedevcamp</a>, <a href="http://technorati.com/tag/devcamp" rel="tag"> devcamp</a>, <a href="http://technorati.com/tag/barcamp" rel="tag"> barcamp</a>, <a href="http://technorati.com/tag/webdev" rel="tag"> webdev</a>, <a href="http://technorati.com/tag/webapp" rel="tag"> webapp</a>, <a href="http://technorati.com/tag/javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/js" rel="tag"> js</a>, <a href="http://technorati.com/tag/tilt" rel="tag"> tilt</a>, <a href="http://technorati.com/tag/iphone+game" rel="tag"> iphone game</a>, <a href="http://technorati.com/tag/firebug" rel="tag"> firebug</a></p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2007/07/09/iphone-dev-camp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Div Align With CSS</title>
		<link>http://juixe.com/techknow/index.php/2007/01/14/div-align-with-css/</link>
		<comments>http://juixe.com/techknow/index.php/2007/01/14/div-align-with-css/#comments</comments>
		<pubDate>Sun, 14 Jan 2007 18:47:41 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2007/01/14/div-align-with-css/</guid>
		<description><![CDATA[When playing with custom web designs, or off the shelf templates, the most common CSS work involves changing the margin, padding, color and background of HTML elements. I usually also usually align elements either to the left, right, or center using CSS. To get started with code samples, to center a div in the middle [...]]]></description>
			<content:encoded><![CDATA[<p>When playing with custom web designs, or off the shelf templates, the most common CSS work involves changing the margin, padding, color and background of HTML elements.  I usually also usually align elements either to the left, right, or center using CSS.</p>
<p>To get started with code samples, to center a div in the middle of a container div you can use the following CSS:</p>
<pre>
.center {
  margin-left: auto;
  margin-right: auto;
}
</pre>
<p>If you want to align a div to the right and another div opposite to the first on the left you can use the following CSS classes.</p>
<pre>
.right {
  float: right;
}
.left {
   float: left;
}
</pre>
<p>I have found that when I used both div that float both to the right and left that you have to follow that with an empty div that clears, or resets, the float CSS property.  If I donâ€™t clear the float property other elements such as a menu that is aligned to the right might not render correctly.  Here is the CSS class to clear the float property, use it in a div the divs that have been aligned to the right, left, or both right and left.</p>
<pre>
.clear {
  clear: both;
}
</pre>
<p>Technorati Tags: <a href="http://technorati.com/tag/css" rel="tag">css</a>, <a href="http://technorati.com/tag/html" rel="tag"> html</a>, <a href="http://technorati.com/tag/webdesign" rel="tag"> webdesign</a>, <a href="http://technorati.com/tag/clear" rel="tag"> clear</a>, <a href="http://technorati.com/tag/float" rel="tag"> float</a>, <a href="http://technorati.com/tag/div" rel="tag"> div</a>, <a href="http://technorati.com/tag/cs+class" rel="tag"> cs class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2007/01/14/div-align-with-css/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rounded Corners With Rico</title>
		<link>http://juixe.com/techknow/index.php/2006/08/10/rounded-corners-with-rico/</link>
		<comments>http://juixe.com/techknow/index.php/2006/08/10/rounded-corners-with-rico/#comments</comments>
		<pubDate>Fri, 11 Aug 2006 04:38:03 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/08/10/rounded-corners-with-rico/</guid>
		<description><![CDATA[I&#8217;ve seen and tried a ton of HTML/CSS/JavaScript tricks and hacks to get rounded corners on DIV elements. So far I have found that the easist way to get rounded corners on divs is by using the Rico JavaScript framework. To demonstrate this in code let me define a snippet of HTML: To make the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen and tried a ton of HTML/CSS/JavaScript tricks and hacks to get rounded corners on DIV elements.  So far I have found that the easist way to get rounded corners on divs is by using the <a href="http://openrico.org/">Rico</a> JavaScript framework.  To demonstrate this in code let me define a snippet of HTML:</p>
<p>&lt;DIV id=&#8221;mydiv&#8221; style=&#8221;background-color: #FFE6BF&#8221;&gt;<br />
  some text<br />
&lt;/DIV&gt;</p>
<p>To make the DIV element have rounded corners just execute the following bit of JavaScript, perhaps in the document.onload event method:</p>
<p>Rico.Corner.round(&#8216;mydiv&#8217;);</p>
<p>You can also pass in some additional options to Rico&#8217;s round function which indicates which corner(s) to round.  Here is another example which rounds only the top-right and bottom-left corners:</p>
<p>Rico.Corner.round(&#8216;mydiv&#8217;, {corners:&#8217;tr bl&#8217;});</p>
<p>And of course, br and tl also work.</p>
<p>As a convinience, you can round the corners of multiple elements at once.  To round all DIV elements that use a given class use the following JavaScript:</p>
<p>new Rico.Effect.Round(&#8216;div&#8217;, &#8217;roundCssClass&#8217;);</p>
<p>With the above JavaScript, only those DIV element that use the CSS class roundCssClass will be rounded off.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/rico" rel="tag">rico</a>, <a href="http://technorati.com/tag/javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/html" rel="tag"> html</a>, <a href="http://technorati.com/tag/framework" rel="tag"> framework</a>, <a href="http://technorati.com/tag/web2.0" rel="tag"> web2.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2006/08/10/rounded-corners-with-rico/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Hackary</title>
		<link>http://juixe.com/techknow/index.php/2006/07/23/css-hackary/</link>
		<comments>http://juixe.com/techknow/index.php/2006/07/23/css-hackary/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 04:36:59 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/23/css-hackary/</guid>
		<description><![CDATA[A friend of mine recently asked me what was my most used CSS hack. The first thing I said was that I am not a web designer, I just play one on TV. I have found that everybody knows or can easily look up how to apply a border, text alignment, background image, etc to [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine recently asked me what was my most used CSS hack.  The first thing I said was that I am not a web designer, I just play one on TV.  I have found that everybody knows or can easily look up how to apply a border, text alignment, background image, etc to an HTML element using CSS.  What I have discovered through experimentation is that browsers allow you to define more than one CSS class per element.  I have recently been using the Yahoo UI Library and their yui-u CSS class that defines a layout block.  But for that block I wanted to apply some additional style attributes.  I was able to combine the yui-u layout and my style CSS class by doing the following:</p>
<pre>
&lt;DIV class="yui-u content"&gt;CONTENT HERE&lt;/DIV&gt;
</pre>
<p>Technorati Tags: <a href="http://technorati.com/tag/yui" rel="tag">yui</a>, <a href="http://technorati.com/tag/yahoo+ui" rel="tag"> yahoo ui</a>, <a href="http://technorati.com/tag/yahoo+ui+library" rel="tag"> yahoo ui library</a>, <a href="http://technorati.com/tag/css" rel="tag"> css</a></p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2006/07/23/css-hackary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acts As Taggable Tag Cloud</title>
		<link>http://juixe.com/techknow/index.php/2006/07/15/acts-as-taggable-tag-cloud/</link>
		<comments>http://juixe.com/techknow/index.php/2006/07/15/acts-as-taggable-tag-cloud/#comments</comments>
		<pubDate>Sat, 15 Jul 2006 18:18:08 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2006/07/15/acts-as-taggable-tag-cloud/</guid>
		<description><![CDATA[If you are using the Ruby on Rails acts_as_taggable plugin you may want to display the top tags in a tag cloud. To generate a tag cloud you will to write some code beyond just writing the controller action. You will need to augment the taggable plugin itself and create a function in the application [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the Ruby on Rails <a href="http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-taggable-plugin/">acts_as_taggable</a> plugin you may want to display the top tags in a <b>tag cloud</b>.  To generate a tag cloud you will to write some code beyond just writing the controller action.  You will need to augment the taggable plugin itself and create a function in the application helper.  Lets start by adding a new method in the Tag model provided by the acts_as_taggable plugin.  Open the vendor/plugins/acts_as_taggable/lib/tag.rb file and add this method:</p>
<pre>
def self.tags(options = {})
  query = "select tags.id, name, count(*) as count"
  query &lt;&lt; " from taggings, tags"
  query &lt;&lt; " where tags.id = tag_id"
  query &lt;&lt; " group by tag_id"
  query &lt;&lt; " order by #{options[:order]}" if options[:order] != nil
  query &lt;&lt; " limit #{options[:limit]}" if options[:limit] != nil
  tags = Tag.find_by_sql(query)
end
</pre>
<p>This method will return the id, name, and usage count for each tag.  This method also provides a way to limit and order the tags.  Once we have added the new method in the <b>Tag</b> model we will need to add a method to the application helper which will help in selecting the right style class for each tag.  Add the following function to app/helpers/application_helper.rb:</p>
<pre>
def tag_cloud(tags, classes)
  max, min = 0, 0
  tags.each { |t|
    max = t.count.to_i if t.count.to_i &gt; max
    min = t.count.to_i if t.count.to_i &lt; min
  }

  divisor = ((max - min) / classes.size) + 1

  tags.each { |t|
    yield t.name, classes[(t.count.to_i - min) / divisor]
  }
end
</pre>
<p>The implementation for the tag_cloud method is based on the work done by <a href="http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code">Tom Fakes</a>.  With the tags method in the Tag model and the tag_cloud method in the application helper we can now focus on the controller and view.  In the controller you can use the following bit of code to get the the first one hundred tags order by name:</p>
<pre>
@tags = Tag.tags(:limit =&gt; 100, :order =&gt; "name desc")
</pre>
<p>In the view we will use the tag_cloud method so that it will select the right css class based on the tag usage count.  Here is the view code:</p>
<pre>
&lt;% tag_cloud @tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class| %&gt;
  &lt;%= link_to name, {:action =&gt; :tag, :id =&gt; name},
    :class =&gt; css_class %&gt;
&lt;% end %&gt;
</pre>
<p>Please note that nube1 through nube5 are css class names which will need to be defined in your stylesheet to generate the cloud effect.  Just completeness sake here are my css classes:</p>
<pre>
.nube1 {font-size: 1.0em;}
.nube2 {font-size: 1.2em;}
.nube3 {font-size: 1.4em;}
.nube4 {font-size: 1.6em;}
.nube5 {font-size: 1.8em;}
.nube6 {font-size: 2.0em;}
</pre>
<p>Technorati Tags: <a href="http://technorati.com/tag/ruby+on+rails" rel="tag">ruby on rails</a>, <a href="http://technorati.com/tag/rails" rel="tag"> rails</a>, <a href="http://technorati.com/tag/rails+plugins" rel="tag"> rails plugins</a>, <a href="http://technorati.com/tag/acts_as_taggable" rel="tag"> acts_as_taggable</a>, <a href="http://technorati.com/tag/tag+cloud" rel="tag"> tag cloud</a></p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2006/07/15/acts-as-taggable-tag-cloud/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Style And Class</title>
		<link>http://juixe.com/techknow/index.php/2005/11/06/style-and-class/</link>
		<comments>http://juixe.com/techknow/index.php/2005/11/06/style-and-class/#comments</comments>
		<pubDate>Sun, 06 Nov 2005 22:13:50 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/index.php/2005/11/06/style-and-class/</guid>
		<description><![CDATA[With JavaScript you can access and update an elementâ€™s style and even its class. Say that you have two CSS classes: .warning {color: yellow;} .error {color: green;} You can update or switch an elementâ€™s CSS class with the following JavaScript code: var element = document.getElementById('element'); element.className = 'warning'; But you can access individual CSS attributes [...]]]></description>
			<content:encoded><![CDATA[<p>With JavaScript you can access and update an elementâ€™s style and even its class.  Say that you have two CSS classes:</p>
<pre>
.warning {color: yellow;}
.error {color: green;}
</pre>
<p>You can update or switch an elementâ€™s CSS class with the following JavaScript code:</p>
<pre>
var element = document.getElementById('element');
element.className = 'warning';
</pre>
<p>But you can access individual CSS attributes via an elementâ€™s style object, such as</p>
<pre>
var element = document.getElementById('element');
element.style.color  = 'green';
</pre>
<p>Of course, you might update an elementâ€™s style based on some event or in conjunction of an Ajax call.</p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2005/11/06/style-and-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript FX</title>
		<link>http://juixe.com/techknow/index.php/2005/11/05/javascript-fx/</link>
		<comments>http://juixe.com/techknow/index.php/2005/11/05/javascript-fx/#comments</comments>
		<pubDate>Sat, 05 Nov 2005 20:23:08 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/?p=31</guid>
		<description><![CDATA[A lot of peeps are talking about Ajax this and Ajax that. Since JavaScript is the J in Ajax, what a lot of people have set out to do is create JavaScript effects libraries. There are several libraries available such as dojo toolkit, prototype framework, script.aculo.us, and others. I wanted to us some effects on [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of peeps are talking about Ajax this and Ajax that.  Since JavaScript is the J in Ajax, what a lot of people have set out to do is create JavaScript effects libraries.  There are several libraries available such as dojo toolkit, prototype framework, script.aculo.us, and others.  I wanted to us some effects on several projects, including this site, and decided to try out moofx but because a restriction in use I opted to write some JavaScript code of my own.  The issue with moofx was that you could not apply padding or borders to your element if you wanted to use the Height and/or Width effect.  Since I wanted to minimize the height of an element and those elements had borders and padding I could not use moofx.  So instead I just developed a bit of JavaScript code to change the elementâ€™s CSS.  Here is the code:</p>
<pre>
function fxToggle(id) {
    var element = document.getElementById(id);
    if(element &#038;&#038; element.style) {
        var isBlank = true;
        if(element.style.display != 'none') {
            element.style.display = 'none';
        }else {
            element.style.display = 'block';
        }
    }
    return false;
}
</pre>
<p>This code will toggle an elementâ€™s display from none to block.  When the display is set to none the element is not visible or takes up any real estate.  I use a link to toggle an element&#8217;s display like this:</p>
<pre>
&lt;A href=&quot;#&quot; onclick=&quot;return fxToggle('elemId');&quot;&gt;
  Meta
&lt;/A&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2005/11/05/javascript-fx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Import Script, Import CSS, Import PHP</title>
		<link>http://juixe.com/techknow/index.php/2005/09/27/import-script-import-css-import-php/</link>
		<comments>http://juixe.com/techknow/index.php/2005/09/27/import-script-import-css-import-php/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 13:19:51 +0000</pubDate>
		<dc:creator>TechKnow</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[TechKnow]]></category>

		<guid isPermaLink="false">http://www.juixe.com/techknow/?p=8</guid>
		<description><![CDATA[Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files. JavaScript: &#60;script type='text/javascript' src='directory/file.js'&#62; &#60;/script&#62; CSS: &#60;style type='text/css' media='all'&#62; @import 'directory/file.css'; &#60;/style&#62; Icon: &#60;link rel='Shortcut Icon' href='directory/file.ico' type='image/x-icon'&#62; PHP: &#60;?php @ require_once ('directory/file.html'); ?&#62; For the PHP import, by placing the @ symbol before require_once suppresses any error [...]]]></description>
			<content:encoded><![CDATA[<p>Just because sometimes I forget, here are some code fragments to import JavaScript, CSS, and PHP files.</p>
<p>JavaScript:</p>
<pre>
&lt;script
   type='text/javascript'
   src='directory/file.js'&gt;
&lt;/script&gt;
</pre>
<p>CSS:</p>
<pre>
&lt;style type='text/css'  media='all'&gt;
   @import 'directory/file.css';
&lt;/style&gt;
</pre>
<p>Icon:</p>
<pre>
&lt;link
   rel='Shortcut Icon'
   href='directory/file.ico'
   type='image/x-icon'&gt;
</pre>
<p>PHP:</p>
<pre>
&lt;?php @ require_once ('directory/file.html'); ?&gt;
</pre>
<p>For the PHP import, by placing the @ symbol before require_once suppresses any error messages that might be generated in the included PHP file.</p>
<p>JSP:</p>
<pre>
&lt;%@ include file='jspfile.jspi' %&gt;
</pre>
<p>And, well, I guess the list can go on and on.  You can use Struts Tiles to include other JSP snippets.  I am sure that other languages and frameworks have the same functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://juixe.com/techknow/index.php/2005/09/27/import-script-import-css-import-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

