<?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"
	>

<channel>
	<title>Digital Path Blog</title>
	<atom:link href="http://www.digitalpath.co.nz/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalpath.co.nz/blog</link>
	<description>Web Development Fragments</description>
	<pubDate>Sun, 25 Jan 2009 02:46:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Create round cornered boxes with Coldfusion and CSS</title>
		<link>http://www.digitalpath.co.nz/blog/2008/11/create-round-cornered-boxes-with-coldfusion-and-css/</link>
		<comments>http://www.digitalpath.co.nz/blog/2008/11/create-round-cornered-boxes-with-coldfusion-and-css/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 13:34:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[ColdFusion]]></category>

		<category><![CDATA[General]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.digitalpath.co.nz/blog/?p=6</guid>
		<description><![CDATA[Recently, while working on a CMS based project for a client, I was suddenly stumped when I realised that my client had zero knowledge of CSS and/or HTML and would want to create coloured boxes with round corners. The kind of boxes that every web developer wished were easy to create (apparently CSS3 has provisions [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while working on a CMS based project for a client, I was suddenly stumped when I realised that my client had zero knowledge of CSS and/or HTML and would want to create coloured boxes with round corners. The kind of boxes that every web developer wished were easy to create (apparently <a title="Border radius in CSS3" href="http://www.w3.org/TR/2005/WD-css3-background-20050216/#the-border-radius" target="_blank">CSS3 has provisions for this</a>)! Obviously, us developers cannot show too much compliance with standards since we still have to support masterpiece softwares like Internet Explorer (<a title="Dear IE6, I hate you" href="http://www.contrast.ie/blog/dear-ie6-i-hate-you/" target="_blank">particularly version 6</a>), and so I thought I&#8217;d devise my own way to achieve this effect. This tutorial might seem a little tedious to complete, but it saved me and my client a lot of time.</p>
<h2>Step 1</h2>
<p>Fire up Photoshop or another graphics editing application. Create a new document with width and height of 20px. Make sure the background is set to Transparent. We are going to make the box very flexible. You will be able to place it on any background colour,</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step1.jpg"><img class="alignnone size-medium wp-image-7" title="New Document" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step1-300x115.jpg" alt="" width="300" height="115" /></a></p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step2.jpg"><img class="alignnone size-medium wp-image-8" title="Step 2" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step2-300x183.jpg" alt="" width="300" height="183" /></a></p>
<h2>Step 2</h2>
<p>Then create a circle of radius 10 pixels. For the purpose of this tutorial we will create the circle in a single colour, a nice orange with Hex code #FF9933. I put in a few guidelines to help me snap the Circle path tool. Notice also I divided the image into 4 quadrants. The will form the 4 corners.</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step3.jpg"><img class="alignnone size-medium wp-image-9" title="Step 3" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step3-300x202.jpg" alt="" width="300" height="202" /></a></p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step4.jpg"><img class="alignnone size-medium wp-image-10" title="Step 4" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step4-300x291.jpg" alt="" width="300" height="291" /></a></p>
<h2>Step 3</h2>
<p>Now slice and dice your 4 quadrants. Use the guide lines to help you snap your selection.</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step5.jpg"><img class="alignnone size-medium wp-image-11" title="Step 5" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step5.jpg" alt="" width="226" height="90" /></a></p>
<p>Using the &#8216;Slice Select Tool&#8217; double click on the 4 slices you created and rename them to &#8216;orange_tl&#8217; for top left, &#8216;orange_tr&#8217; for top right and so on. Remember, the &#8216;orange_&#8217; part of the name is important as the component we are going to build will use this name. When you decide to create round boxes of other colours, this will come in handy.</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step6.jpg"><img class="alignnone size-full wp-image-12" title="Step 6" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step6.jpg" alt="" width="500" height="397" /></a></p>
<h2>Step 4</h2>
<p>Go to the File menu and select &#8216;Save for Web &amp; Devices&#8230;&#8217;</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step7.jpg"><img class="alignnone size-medium wp-image-13" title="Step 7" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step7-272x300.jpg" alt="" width="272" height="300" /></a></p>
<p>Select all four slices by holding down SHIFT and clicking on the slices. Select &#8216;PNG-24&#8242; as the export format. Make sure the &#8216;Transparency&#8217; checkbox is selected. Then click &#8216;Save&#8217;.</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step8.jpg"><img class="alignnone size-full wp-image-14" title="Step 8" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step8.jpg" alt="" width="500" height="459" /></a></p>
<p>In the file save dialog, you need to make sure you select &#8216;Selected Slices&#8217;. This is a good practice when exporting slices. By default, Photoshop select &#8216;All Slices&#8217; and this can be annoying when you end up with unnecessary image slices.</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step9.jpg"><img class="alignnone size-full wp-image-15" title="Step 9" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/step9.jpg" alt="" width="390" height="92" /></a></p>
<h2>Phew! Almost done&#8230;</h2>
<p>Right, the hard part is over&#8230;.yeah right! Below is the all CSS you need to make round box magic:</p>
<pre>&lt;style&gt;
h1, h2, h3, h4, h5, p{
margin:0;
}

body{font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;}

/* round boxes */
.whitebg {background-color:#FFFFFF;}
.orangebg {background-color:#FF9933;}
.redbg {background-color:#FF0000;}
.roundbox_orange_content {color: #FFFFFF;}

/* utility styles */
.nomargin{margin:0;}
.nopadding{padding:0;}

.floatleft{float:left;}
.floatright{float:right;}
.floatnone{float:none;}

.clearleft{clear:left;}
.clearright{clear:right;}
.clearboth{clear:both;}
.clearnone{clear:none;}

.padding10{ padding:10px;}
.padding10left{ padding-left:10px;}
.padding10right{ padding-right:10px;}
.padding10top{ padding-top:10px;}
.padding10bottom{ padding-bottom:10px;}

.padding20{ padding:20px;}
.padding20left{	padding-left:20px;}
.padding20right{ padding-right:20px;}
.padding20top{ padding-top:20px;}
.padding20bottom{ padding-bottom:20px;}

.padding30{ padding:30px;}
.padding30left{	padding-left:30px;}
.padding30right{ padding-right:30px;}
.padding30top{ padding-top:30px;}
.padding30bottom{ padding-bottom:30px;}

.margin10{ margin:10px;}
.margin10left{ margin-left:10px;}
.margin10right{	margin-right:10px;}
.margin10top{ margin-top:10px;}
.margin10bottom{ margin-bottom:10px;}

.margin20{ margin:20px;}
.margin20left{ margin-left:20px;}
.margin20right{ margin-right:20px;}
.margin20top{ margin-top:20px;}
.margin20bottom{ margin-bottom:20px;}

.margin30{ margin:30px;}
.margin30left{ margin-left:30px;}
.margin30right{ margin-right:30px;}
.margin30top{ margin-top:30px;}
.margin30bottom{ margin-bottom:30px;}

/* slightly enhanced, universal clearfix hack */
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }

/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* stop commented backslash hack */

.border{border:1px solid red;}

&lt;/style&gt;</pre>
<p>Create a CFM page called &#8217;roundbox.cfm&#8217;. This will be a module that we use to create a roundbox. The code for this page is given below:</p>
<pre>&lt;cfparam name="attributes.colour" default="orange"&gt;
&lt;cfparam name="attributes.id" default="roundbox"&gt;
&lt;cfparam name="attributes.radius" default=10&gt;
&lt;cfparam name="attributes.float" default="left"&gt;
&lt;cfparam name="attributes.clear" default="none"&gt;
&lt;cfparam name="attributes.width" default=0&gt;
&lt;cfparam name="attributes.height" default=""&gt;
&lt;cfparam name="attributes.margin" default=10&gt;
&lt;cfparam name="attributes.marginposition" default=""&gt;
&lt;cfparam name="attributes.padding" default=10&gt;
&lt;cfparam name="attributes.paddingposition" default="left,right"&gt;
&lt;cfparam name="attributes.rawcss" default=""&gt;

&lt;cfset theColour = attributes.colour&gt;
&lt;cfset theID = attributes.id&gt;
&lt;cfset theRadius = attributes.radius&gt;

&lt;cfset theWidth = attributes.width&gt;
&lt;cfset theHeight = attributes.height&gt;
&lt;cfset theFloat = attributes.float&gt;

&lt;cfif theFloat EQ "none"&gt;
&lt;cfset theWidth = 0&gt;
&lt;/cfif&gt;

&lt;cfset theClear = attributes.clear&gt;
&lt;cfset theMarginPosition = attributes.marginposition&gt;
&lt;cfset theMargin = attributes.margin&gt;

&lt;cfif theMargin EQ 0&gt;
&lt;cfset theMargin = "none"&gt;
&lt;/cfif&gt;

&lt;cfif theMargin EQ "none"&gt;
&lt;cfset theMarginString = ""&gt;
&lt;cfelse&gt;
&lt;cfset theMarginString = ""&gt;
&lt;cfloop list="#theMarginPosition#" delimiters="," index="idx"&gt;
&lt;cfset theMarginString = theMarginString &amp; "margin" &amp; theMargin &amp; idx &amp; " "&gt;
&lt;/cfloop&gt;
&lt;/cfif&gt;

&lt;cfset thePaddingPosition = attributes.paddingposition&gt;
&lt;cfset thePadding = attributes.padding&gt;

&lt;cfif thePadding EQ "none"&gt;
&lt;cfset thePaddingString = ""&gt;
&lt;cfelse&gt;
&lt;cfset thePaddingString = ""&gt;
&lt;cfloop list="#thePaddingPosition#" delimiters="," index="idx"&gt;
&lt;cfset thePaddingString = thePaddingString &amp; "padding" &amp; thePadding &amp; idx &amp; " "&gt;
&lt;/cfloop&gt;
&lt;/cfif&gt;

&lt;cfset theRawCss = attributes.rawcss&gt;

&lt;cfoutput&gt;
&lt;cfif ThisTag.ExecutionMode EQ "start"&gt;
&lt;div id="#theID#" class="float#theFloat# clear#theClear# #theMarginString# clearFix" style="width:#theWidth#px; #theRawCss#"&gt;
&lt;div&gt;
&lt;div style="width:#theRadius#px; height:#theRadius#px; float:left; clear:none; font-size:0;"&gt;&lt;img src="/images/corners/#theColour#_tl.png" width="#theRadius#" height="#theRadius#"&gt;&lt;/div&gt;
&lt;div style="width:#theWidth - (2 * theRadius)#px; height:#theRadius#px; float:left; clear:none; font-size:0;" class="#theColour#bg"&gt;&lt;/div&gt;
&lt;div style="width:#theRadius#px; height:#theRadius#px; float:left; clear:none; font-size:0;"&gt;&lt;img src="/images/corners/#theColour#_tr.png" width="#theRadius#" height="#theRadius#"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="clearboth #thePaddingString# #theColour#bg roundbox_#theColour#_content clearFix" style="height:#theHeight#;"&gt;
&lt;cfelse&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="width:#theRadius#px; height:#theRadius#px; float:left; clear:none; font-size:0;"&gt;&lt;img src="/images/corners/#theColour#_bl.png" width="#theRadius#" height="#theRadius#"&gt;&lt;/div&gt;
&lt;div style="width:#theWidth - (2 * theRadius)#px; height:#theRadius#px; float:left; clear:none; font-size:0;" class="#theColour#bg"&gt;&lt;/div&gt;
&lt;div style="width:#theRadius#px; height:#theRadius#px; float:left; clear:none; font-size:0;"&gt;&lt;img src="/images/corners/#theColour#_br.png" width="#theRadius#" height="#theRadius#"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/cfif&gt;
&lt;/cfoutput&gt;</pre>
<p>Make sure the images are placed in the correct path and that the paths in the &#8217;roundbox.cfm&#8217; file match these.</p>
<p>Once the above are ready, you can now call the &#8217;roundbox.cfm&#8217; file as a ColdFusion module as shown below:</p>
<pre>&lt;cfmodule template="roundbox.cfm" colour="orange" id="mybox" width=200 margin=10 radius=10&gt;
&lt;h3&gt;Hi, I'm a round cornered box!&lt;/h3&gt;
&lt;p&gt;I'm really easy to make!&lt;/p&gt;
&lt;/cfmodule&gt;</pre>
<p>The above code produces the box shown below:</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/orange_10.jpg"><img class="alignnone size-full wp-image-16" title="Orange radius 10" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/orange_10.jpg" alt="" width="480" height="254" /></a></p>
<p>All parameters are configurable and this truly allows you to create a large variety of round corner boxes. Just look at the examples below:</p>
<p>Colour=purple<br />
Radius=10</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/purple_10.jpg"><img class="alignnone size-full wp-image-17" title="Purple radius 10" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/purple_10.jpg" alt="" width="448" height="257" /></a></p>
<p>Colour=darkpink<br />
Radius=5</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/darkpink_5.jpg"><img class="alignnone size-full wp-image-18" title="Dark Pink radius 5" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/darkpink_5.jpg" alt="" width="430" height="262" /></a></p>
<p>Colour=pink<br />
Radius=20</p>
<p><a href="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/pink_20.jpg"><img class="alignnone size-full wp-image-19" title="Pink radius 20" src="http://www.digitalpath.co.nz/blog/wp-content/uploads/2008/11/pink_20.jpg" alt="" width="439" height="270" /></a></p>
<p>All that&#8217;s needed to create various coloured boxes is to have a CSS class named &#8216;.&lt;theColour&gt;bg&#8217; and also a class named &#8216;.roundbox_&lt;theColour&gt;_content&#8217; in case you need to format the contained text.</p>
<p>Hope you enjoyed my first tutorial. I hope this technique comes in handy for you like it has for me.</p>
<p>I would love to receive feedback, so please do post your comments!</p>
<p>Happy designing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalpath.co.nz/blog/2008/11/create-round-cornered-boxes-with-coldfusion-and-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free CSS based webpage templates</title>
		<link>http://www.digitalpath.co.nz/blog/2008/08/free-css-based-webpage-templates/</link>
		<comments>http://www.digitalpath.co.nz/blog/2008/08/free-css-based-webpage-templates/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 01:08:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[HTML]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[free css templates]]></category>

		<category><![CDATA[open source web design]]></category>

		<guid isPermaLink="false">http://www.digitalpath.co.nz/blog/?p=5</guid>
		<description><![CDATA[CSS based templates are definitely the future of web development. Tableless design is what web designers strive for these days. There are many places you can find free CSS templates at. Here is one I found today. Check it out. Another great place is the Open Source Web Design website which offers free templates to [...]]]></description>
			<content:encoded><![CDATA[<p>CSS based templates are definitely the future of web development. Tableless design is what web designers strive for these days. There are many places you can find free CSS templates at. <a title="Free CSS templates" href="http://csstinderbox.raykonline.com/free-stuff.html" target="_blank">Here is one I found today</a>. Check it out. Another great place is the <a title="Open Source Web Design website" href="http://www.oswd.org/" target="_blank">Open Source Web Design</a> website which offers free templates to get you started.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalpath.co.nz/blog/2008/08/free-css-based-webpage-templates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Blog Launch</title>
		<link>http://www.digitalpath.co.nz/blog/2008/08/blog-launch/</link>
		<comments>http://www.digitalpath.co.nz/blog/2008/08/blog-launch/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:40:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.digitalpath.co.nz/blog/?p=3</guid>
		<description><![CDATA[Welcome to the first post on the Digital Path Blog! We are a small freelancing team of skilled web site designers and developers based in Auckland, New Zealand. As and when we come across interesting stuff on the net, we will be posting it here, so keep an eye out for the latest and greatest [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the first post on the Digital Path Blog! We are a small freelancing team of skilled web site designers and developers based in Auckland, New Zealand. As and when we come across interesting stuff on the net, we will be posting it here, so keep an eye out for the latest and greatest in web technologies and more&#8230;!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalpath.co.nz/blog/2008/08/blog-launch/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
