<?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>FWebDe</title>
	<atom:link href="http://fwebde.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fwebde.com</link>
	<description>Helping people to make fantastic websites, whether you are a designer, a developer, or someone just who loves websites.</description>
	<lastBuildDate>Sat, 18 Feb 2012 08:39:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Pure CSS3 Animated Dropdown Navigation</title>
		<link>http://fwebde.com/css/css3-animated-dropdown/</link>
		<comments>http://fwebde.com/css/css3-animated-dropdown/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 08:36:58 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2545</guid>
		<description><![CDATA[As you probably already know, CSS3 introduces many new features, one of which is the ability to create animated transitions using nothing but CSS. You've seen this used for many different things, from animated buttons, to accordions menus, to some fun CSS experiments.

One common technique that is completely doable with CSS, but which still remains in the realm of jQuery and other Javascript techniques, is animated dropdown menus.]]></description>
			<content:encoded><![CDATA[<p>As you probably already know, CSS3 introduces many new features, one of which is the ability to create animated transitions using nothing but CSS. You've seen this used for many different things, from animated buttons, to accordions menus, to some fun CSS experiments.</p>
<p>One common technique that is completely doable with CSS, but which still remains in the realm of jQuery and other Javascript techniques, is animated dropdown menus.</p>
<p>For an example of what we will be making, you can <strong><a href="http://examples.fwebde.com/demos/css3nav/nav.html">see the demo</a></strong>.</p>
<h3>Create the HTML</h3>
<p>We can start by creating a simple unordered list, however because of the way this menu works, the structure must be a bit different from your standard navigation hierarchy. For this to work, the parent of a sub-menu should be its first item.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;nav-wrapper&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;nav&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Home<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;subnav&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Parent<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Child 1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Child 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;subnav&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Parent 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Child 3<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;li<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Child 4<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<h3>Style it With CSS</h3>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#nav-wrapper</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">700px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'nav-bg.png'</span><span style="color: #00AA00;">&#41;</span> <span style="color: #000000; font-weight: bold;">top</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">border-radius</span><span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
    -webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
    -moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
ul li a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#nav</span> a<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#nav</span> a<span style="color: #3333ff;">:link</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#nav</span> a<span style="color: #3333ff;">:visited </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#555</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Here I used a simple gradient image for the menu background. You could also take this a step further and use CSS3 gradients for the background, instead of having to use an image. But that's a subject for another tutorial.</p>
<p>This will style the top level of the navigation hierarchy, making it look something like this:</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/09/nav-1.png" alt="" title="nav-1" width="669" height="100" class="alignleft size-full wp-image-2555" /></p>
<p>It still doesn't look to great yet, because we haven't applied any styles to the sub-menus yet.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.subnav</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">9999</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span><span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span> li <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">9999</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span> li<span style="color: #3333ff;">:first-child </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">transparent</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">11px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">18px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span> li<span style="color: #3333ff;">:first-child </span>a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span> li a <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.subnav</span> li<span style="color: #3333ff;">:last-child </span><span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">border-radius</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    -webkit-border-radius<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    -moz-border-radius<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>I won't go into detail about what each individual property does, so I'll just cover some of the more important ones.</p>
<p>Basically, this CSS sets the height of each .subnav to the same height as the main menu bar, cutting off the rest below it. The first item of each sub-menu is then styled to match the top-level items, so that nobody can tell the difference.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/09/nav-2.png" alt="" title="nav-2" width="669" height="119" class="alignleft size-full wp-image-2562" /></p>
<p>At this point, hovering over a parent item should cause its children to display below it. This is how slightly older browsers which do not yet suport CSS3 transitions should display the navigation menu.</p>
<h3>Apply the Transitions</h3>
<p>Now to make this menu about a million times more awesome. To create a smooth transition between the two states, the following properties can be added to .subnav:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.subnav</span> <span style="color: #00AA00;">&#123;</span>
    transition<span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">height</span> 0.2s linear<span style="color: #00AA00;">;</span>
    -webkit-transition<span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">height</span> 0.2s linear<span style="color: #00AA00;">;</span>
    -moz-transition<span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">height</span> 0.2s linear<span style="color: #00AA00;">;</span>
    -o-transition<span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">height</span> 0.2s linear<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The first value for <code>transition</code> is the property to be animated, in this case it's <code>height</code>. Next is the duration of the animation in seconds. The third value is the timing function for the animation. <code>linear</code> creates a smooth, even transition between both states. <code>ease</code> is another good one you might want to try.</p>
<p>The <code>transition</code> property is repeated with the same values for each different browser that supports it.</p>
<p><strong><a href="http://examples.fwebde.com/demos/css3nav/nav.html">Here is a demo of the final CSS3 animated dropdown navigation menu.</a></strong></p>
<p>Well there you have it, a pure CSS animated dropdown menu. The best thing about this method is that if your users don't have a browser that supports CSS3 transitions, they can still use your navigation menu perfectly fine, as opposed to many Javascript-based techniques.</p>
<p>What would you add to this navigation menu? Maybe support for multiple levels, or maybe use fancier animations? Leave your answer in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/css/css3-animated-dropdown/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Do You Have What it Takes to Be a Freelance Designer/Developer?</title>
		<link>http://fwebde.com/uncategorized/do-you-have-what-it-takes-to-be-a-freelance-designerdeveloper/</link>
		<comments>http://fwebde.com/uncategorized/do-you-have-what-it-takes-to-be-a-freelance-designerdeveloper/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 08:42:25 +0000</pubDate>
		<dc:creator>baileydigger</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2539</guid>
		<description><![CDATA[There’s always a quandary when you’re a creative professional – you don’t know if you must go freelance or sign up with an organization that specializes in your kind of work. While it’s true that a full-time job could guarantee you financial security and free you of many responsibilities, there’s also the fact that your [...]]]></description>
			<content:encoded><![CDATA[<p>There’s always a quandary when you’re a creative professional – you don’t know if you must go freelance or sign up with an organization that specializes in your kind of work. While it’s true that a full-time job could guarantee you financial security and free you of many responsibilities, there’s also the fact that your creativity could be curtailed and leave your chafing at the bit.</p>
<p>Depending on your employer, you may not have the freedom to design or develop according to your thought process, and having to conform to a script and work with a team could become stressful over a period of time if you’re a free spirited bird who likes to fly solo.</p>
<p>However, before you jump into the freelance industry, there are a few things you need to be prepared for:</p>
<ul>
<li>No matter how talented you are, jobs and clients will not be queuing up at your doorstep, at least not in the beginning.</li>
<li>You must be prepared to do a substantial bit of legwork before you’re able to sink your teeth into a design/development project that is worth your talent - you must be able to sell yourself before you secure a project.</li>
<li>You may need to work at less than the going rate in order to establish a good portfolio.</li>
<li>It’s a good thing when you’re able to set your own timings and schedules, but if you want to meet deadlines and earn the respect of your clients, you must be disciplined and dedicated to the job and be able to stick to your schedule in spite of the many distractions you’re bound to have.</li>
<li>It could be stressful worrying about finding clients on a regular basis.</li>
<li>You would have to haggle with clients over payment, before and after securing the project; not every designer/developer is good with finances, so negotiating payment could prove to be a trying exercise.</li>
<li>All these factors could mean that you don’t have as much time or the concentration necessary to work on your design as you would like to.</li>
</ul>
<p>It may not work for everyone, but in general, it pays to work for an agency first before branching out on your own. The experience will help you not just build your portfolio but also develop discipline towards the job – because freelancers can set their own timings, they sometimes tend to procrastinate and so fail to meet deadlines.</p>
<p>Besides, you also gain contacts in the industry and can work on building a network which will help you get clients on a regular basis and which will help spread your reputation as a credible and skilled designer/developer.</p>
<p>This guest post is contributed by Bailey Digger, she writes on the topic of <a href="http://webdesigndegree.com/">web design degree</a>. She welcomes your comments at her email id: baileydigger189(@)gmail(.)com.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/uncategorized/do-you-have-what-it-takes-to-be-a-freelance-designerdeveloper/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Use SQLite For Your Next PHP Project</title>
		<link>http://fwebde.com/php/sqlite-php/</link>
		<comments>http://fwebde.com/php/sqlite-php/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 18:11:09 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=1477</guid>
		<description><![CDATA[<a href="http://www.sqlite.org/">SQLite</a> is one of those awesome pieces of software known for its "liteness". It is, as you can guess from the name, a database designed to have as small a footprint as possible. SQLite is a very popular database, in fact, it is <a href="http://www.sqlite.org/mostdeployed.html">believed to be the most widely deployed SQL database engine in the world</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sqlite.org/">SQLite</a> is one of those awesome pieces of software known for its "liteness". It is, as you can guess from the name, a database designed to have as small a footprint as possible. SQLite is a very popular database, in fact, it is <a href="http://www.sqlite.org/mostdeployed.html">believed to be the most widely deployed SQL database engine in the world</a>.</p>
<p>SQLite has lately been a very good choice as a database to use for applications you write. If you don't plan on needing to scale up to the extremely high levels of applications that require something "heavier", you may want to give SQLite a try. And the SQLite libraries also come preinstalled with PHP, allowing you to get started using it right away.</p>
<h3>Why Use SQLite?</h3>
<p>SQLite is obviously best known for how lightweight it can be. Of course, they couldn't call it SQLite without it being at least lighter than most other databases.</p>
<p>The main difference between SQLite and other database systems, such as MySQL and PostgreSQL, is that it can be run completely without having to run the database on a separate server process. Instead, an entire SQLite database can be stored inside a single file, which can be accessed directly by an application.</p>
<p>SQLite can also be described as being "zero-configuration". SQLite doesn't require anything to be installed before it is used, and it does not rely on a separate server process that needs to be configured.</p>
<p>So, if this is enough to convince you to give SQLite a try, then let's get started, shall we?</p>
<h3>Getting Started</h3>
<p>The SQLite libraries included with PHP make it very easy to get started coding right away. Let's get started with some of the easier things.</p>
<h4>Creating a Database</h4>
<p>You can create a database and execute queries in SQLite just as you would in MySQL. The first thing to do to create your database is to open up a terminal and navigate to where you want your database to be located.</p>
<p>Then, start up the SQLite command-line interface with a command similar to this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">sqlite3 database.db</pre></td></tr></table></div>

<p>If everything goes fine, you should be greeted with a command prompt like this.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">SQLite version 3.6.22
Enter &quot;.help&quot; for instructions
Enter SQL statements terminated with a &quot;;&quot;
sqlite&gt;</pre></td></tr></table></div>

<p>Here you can type in your SQL statements to build your database. For now, we'll just create a couple of tables to work with in PHP later.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> posts <span style="color: #66cc66;">&#40;</span>
    id <span style="color: #993333; font-weight: bold;">INTEGER</span> PRIMARY_KEY <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #66cc66;">,</span>
    title TEXT<span style="color: #66cc66;">,</span>
    content TEXT
<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<h4>Connecting to a Database</h4>
<p>There are some differences that I have noticed between SQLite 2 and SQLite 3, which can cause some small problems. Because of this, I've found that using PDO is probably the easiest way to connect to an SQLite database.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;">try <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$db</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PDO<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sqlite:/path/to/database.db'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>In the PDO object we can specify the first parameter, which is the database driver and the path to the database itself, separated by a colon. If you want to write to the database at all, you need to first make sure that the user running the server has write permissions to the database file.</p>
<p>The code is wrapped in a try/catch statement as a good practice, just in case if we encounter any errors.</p>
<h4>Executing Queries</h4>
<p>Now you can use all of the standard PDO methods with SQLite to manipulate your database. This actually works in a very similar way to what you would do with a MySQL database. For example, to get your posts from the database:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$posts</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$db</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM posts;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$posts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And once the content being retrieved from the database is stored in $posts, it's a simple matter of displaying the data.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$posts</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchObject</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;li&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">content</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>An Example</h3>
<p>In this example, we have a simple form to insert data in to the database we created earlier. I've added some comments to show examples of both fetching data from the database, and inserting data using prepared statements.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">&lt; ?php
// PHP SQLite3 demo
&nbsp;
// Connect to the database with PDO
try {
    $db = new PDO('sqlite:/var/www/sqlite/database.db');
} catch (Exception $e) {
    die ($e);
}
&nbsp;
// Insert a post into the DB
if (isset($_POST['title']) &amp;&amp; isset($_POST['content'])) {
    try {
        // Create a prepared statement
        $stmt = $db-&gt;prepare(&quot;INSERT INTO POSTS (title, content) VALUES (:title, :content);&quot;);
        $stmt-&gt;bindParam(':title', $title);
        $stmt-&gt;bindParam(':content', $content);
&nbsp;
        // Fill in the values
        $title = $_POST['title'];
        $content = $_POST['content'];
        $stmt-&gt;execute();
    } catch (Exception $e) {
        die ($e);
    }
}
&nbsp;
// Get posts from database
try {
    $posts = $db-&gt;prepare('SELECT * FROM posts;');
    $posts-&gt;execute();
} catch (Exception $e) {
    die ($e);
}
&nbsp;
?&gt;
&nbsp;
&lt;h1&gt;Posts - SQLite Example&lt;/h1&gt;
&nbsp;
&lt; ?php while ($post = $posts-&gt;fetchObject()): ?&gt;
&nbsp;
    &lt;h2&gt;&lt; ?php echo $post-&gt;title ?&gt;&lt;/h2&gt;
    &lt; ?php echo $post-&gt;content ?&gt;
&nbsp;
&lt; ?php endwhile; ?&gt;
&nbsp;
&lt;hr /&gt;
&nbsp;
&lt;h2&gt;Add new Post&lt;/h2&gt;
&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
&nbsp;
    &lt;p&gt;
        &lt;label for=&quot;title&quot;&gt;Title:&lt;/label&gt;
        &lt;input type=&quot;text&quot; name=&quot;title&quot; /&gt;
    &lt;/p&gt;
&nbsp;
    &lt;p&gt;
        &lt;textarea name=&quot;content&quot; rows=&quot;8&quot; cols=&quot;50&quot;&gt;&lt;/textarea&gt;
    &lt;/p&gt;
&nbsp;
    &lt;p&gt;
        &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Submit&quot; /&gt;
    &lt;/p&gt;
&nbsp;
&lt;/form&gt;</pre></td></tr></table></div>

<p>As always, if you have any questions, be sure to let us know in the comments section of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/php/sqlite-php/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>8 Less Common CSS Properties You May Find Interesting</title>
		<link>http://fwebde.com/css/less-common-css-properties/</link>
		<comments>http://fwebde.com/css/less-common-css-properties/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 16:59:58 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2436</guid>
		<description><![CDATA[We're all familiar with the most common CSS properties that we use daily, such as <code>width</code>, <code>height</code>, <code>margin</code> and <code>border</code>. And for most projects, the ones we use all the time are just fine. Of course, there are also those ones that you discover through your IDE's autocomplete feature, which can have some pretty interesting results. Some are immediately obvious to what they do, and some are not.]]></description>
			<content:encoded><![CDATA[<p>We're all familiar with the most common CSS properties that we use daily, such as <code>width</code>, <code>height</code>, <code>margin</code> and <code>border</code>. And for most projects, the ones we use all the time are just fine. Of course, there are also those ones that you discover through your IDE's autocomplete feature, which can have some pretty interesting results. Some are immediately obvious to what they do, and some are not.</p>
<div class="clearing"></div>
<ul>
<li><strong><code>word-spacing</code></strong>
<p>This property is for those times when your font's default word spacing just isn't what you want it to be. Use this to add more space between words, or to move them closer together, or even have them overlapping each other! A similar property, <code>letter-spacing</code> is generally seen more often.</p>
</li>
<li><strong><code>azimuth</code></strong>
<p>I'm sure you've heard of this property before, though most people seem to have <em>no idea</em> what it is for. Probably because the name starts with "a", so it always shows up at the top of every IDE's autocomplete list.</p>
<p>Basically the <code>azimuth</code> property specifies the location of the sound when the content is being read aloud. For example, you can specify an angle in degrees (deg), or you can use predefined values such as "center" or "left-side". This property is meant to be used with aural stylesheets.</p>
</li>
<li><strong><code>clip</code></strong>
<p>This CSS property specifies which portion of an absolutely positioned box should be visible. You can specify the value using <code>rect</code>, which will "clip" the box to the shape of the rectangle using the specified coordinates.</p>
</li>
<li><strong><code>cursor</code></strong>
<p>This one has a lot of potential for abuse. However, when used wisely, this CSS property can greatly improve various types of user interfaces. For example, if a certain box is meant to be dragged by the user, you could add this style to the handle: <code>cursor: move</code></p>
</li>
<li><strong><code>empty-cells</code></strong>
<p>Of course, empty cells are a common occurrence when using tables. With this CSS property you can set the value to either <code>show</code> or <code>hide</code>, to specify whether you want empty table cells to be visible or not.</p>
</li>
<li><strong><code>direction</code></strong>
<p>This CSS property specifies the direction of the text in the content. It can be set to either <code>ltr</code> for the default direction for English, or to <code>rtl</code> to have text going from right to left.</p>
</li>
<li><strong><code>outline</code></strong>
<p>This one is kind of similar to <code>border</code>. However the difference between the two is that with <code>outline</code>, the outline is drawn outside of the border, and does not have any effect on the box's size or position.</p>
</li>
<li><strong><code>orphans</code></strong>
<p>The <code>orphans</code> CSS property only applies to paged media. What it does is specify the minimum number of lines inside the element that must be left at the bottom of a page. This This can be helpful to prevent extra lines from screwing up an entire layout.</p>
</li>
</ul>
<p><strong>What other less common CSS properties do you know of? And do you actually use any of them?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/css/less-common-css-properties/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Website Security For Beginners</title>
		<link>http://fwebde.com/programming/website-security-beginners/</link>
		<comments>http://fwebde.com/programming/website-security-beginners/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 08:10:59 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2218</guid>
		<description><![CDATA[Security is a crucial subject that all web developers should know. After all, what good is a website if an attacker can cause it to go down in seconds? Unfortunately, it can be daunting to beginners when you start thinking of security simply as hoops you must jump through to have a safe site]]></description>
			<content:encoded><![CDATA[<p>Security is a crucial subject that all web developers should know. After all, what good is a website if an attacker can cause it to go down in seconds? Unfortunately, it can be daunting to beginners when you start thinking of security simply as hoops you must jump through to have a safe site. So I've decided to outline several very important ideas for web security for beginners, or for experts who need a bit of a refresher.</p>
<div class="clearing"></div>
<h3>Never Trust User Input</h3>
<p>Always assume that any input from your users could potentially bring your site down to its knees, whether through malicious intent, or even by accident.</p>
<p>After all, user input is where the majority of all attacks on your website will come from, so to be constantly vigilant with anything input by the user. There isn't really any specific technique to achieve this, but it is always a good thing to remember at all times when working on your website's security.</p>
<p>Most of the points outlined below are related to this one, explaining various techniques to implement this important idea.</p>
<h3>Sanitize All Input</h3>
<p>User input that has not been properly sanitized can lead to all sorts of nasty things, like SQL injection and XSS attacks.</p>
<p>Make sure that you always sanitize your data when it is being <strong>input</strong>, and not when it is being retrieved from the database. It is always better to only have clean data stored, and avoids any problems if you slip up while sanitizing the data on output.</p>
<h3>Keep Logic and Data Separate</h3>
<p>Vulnerabilities in websites can often be exploited through code injection, which can often be as a result of mixing logic with data. A common example is SQL injection, where an attacker can exploit a vulnerability in your code by modifying your SQL queries to do their bidding.</p>
<p>A great way to separate logic from data is to use prepared statements when working with your database. Basically it helps to separate the two by not making you insert any values directly into your SQL statements, and instead binding parameters later and then executing them.</p>
<h3>Use Proper Directory Permissions</h3>
<p>You may be asking "People can't access my important files, isn't that enough?" It is all too common to find that a shared web host has not been properly configured with security in mind, allowing other users on the same server to access the files of other accounts who haven't set their file permissions correctly.</p>
<p>In general, it is usually discouraged to always set (<code>chmod</code>) your file permissions to 777, because that means that just about anyone can have full access to it.</p>
<h3>Use a Strong Password</h3>
<p>This can't be said enough. Even with thousands of security measures protecting your site from a malicious user, a weak password can quickly end up counteracting the many security measures you have in place.</p>
<p>All of the general rules for passwords apply: make sure it's a decent length, mix uppercase and lowercase characters along with numbers and symbols, pick something that only <em>you</em> remember, and all that good stuff.</p>
<h3>Prepare for the Worst</h3>
<p>Unfortunately, even with some of the strongest security measures built into your site, nothing can ever stop an attacker who is determined enough to get into your site. So, it is also a good idea to prepare for that possibility.</p>
<p>Always keep frequent backups of both your site's files, and of your database. That way once your site is compromised, you'll at least be (hopefully) able to get back up and running as soon as possible. And once your backup is restored to your server, always make sure that you look over anything that could have potentially caused the attack, and fix the vulnerability to prevent this from ever happening again.</p>
<p><em>If you're interested in finding out about specific exploits, how they work, and how to protect against them, be sure to check out my other post on the subject, <a href="http://fwebde.com/programming/hack-your-own-site/">Hack Your Own Site</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/programming/website-security-beginners/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Five Alternatives to WordPress</title>
		<link>http://fwebde.com/wordpress/five-alternatives-to-wordpress/</link>
		<comments>http://fwebde.com/wordpress/five-alternatives-to-wordpress/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 08:00:11 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2493</guid>
		<description><![CDATA[WordPress obviously stands as the most popular blogging platform in use today. And it is, for the most part, an excellent piece of software. However it is always a good idea to explore the alternatives, and you might even find one that you like! So here I present to you five excellent alternatives to WordPress for your blog.]]></description>
			<content:encoded><![CDATA[<p>WordPress obviously stands as the most popular blogging platform in use today. And it is, for the most part, an excellent piece of software. However it is always a good idea to explore the alternatives, and you might even find one that you like! So here I present to you five excellent alternatives to WordPress for your blog.</p>
<h3>b2evolution</h3>
<p><a href="http://b2evolution.net/">b2evolution</a> is an old one, but a good one. b2evolution is an open source blogging platform written in PHP, using a MySQL database. In fact, WordPress originated as a fork of b2evolution, back in 2003. And even though this blogging platform is that old, it is still being updated frequently to compete with more modern platforms.</p>
<h3>Movable Type</h3>
<p><a href="http://www.movabletype.org/">Movable Type</a> is probably one of the most popular alternatives to WordPress, and with good reason. It is a very powerful publishing platform, with all the features you would need to make a site like one running WordPress. And while some of the latest versions of Movable Type use an interface strikingly similar to that of WordPress, I would recommend it to anyone who is looking to try something different.</p>
<h3>Habari</h3>
<p><a href="http://habariproject.org">Habari</a> is described on its website as "next-generation blogging". The main difference between Habari and other blogging platforms is the way it is built, designed for modern hosting environments. Their <a href="http://wiki.habariproject.org/en/FAQ">FAQ</a> does a good job of explaining this:</p>
<blockquote><p>
Habari is being written specifically for modern web hosting environments, and uses modern object-oriented programming techniques. Using these recent but well-established additions to the PHP language allows Habari to make use of PDO, enabling prepared statements for all interactions with the database. This greatly reduces the system's vulnerability to SQL injection attacks. This is just one of many benefits of modern object-oriented techniques.
</p></blockquote>
<h3>WikyBlog</h3>
<p>Now this is an interesting one. <a href="http://www.wikyblog.com/">WikyBlog</a> is a content management system designed with the idea to combine the features of wikis and blogs into a single efficient application. It combines your standard blog styled organization that you'll find in any other blogging platform, with features found in wikis, such as collaborative editing and revision history.</p>
<h3>Write Your Own</h3>
<p>If you can't find a good blogging platform that suits all of your needs, and you are interested to learn, you might want to try your hand at writing your own! It's actually not very hard to create a very basic system, and it is a great learning experience. If you're new to this kind of thing, take a look at my (slightly old, but still good) <a href="http://fwebde.com/web-design/creating-a-php-cms-part-1/">PHP CMS tutorial</a>, and work from there to make it into a full blog system.</p>
<p>Now don't get me wrong, I still love WordPress. But there <em>are</em> many alternatives out there, and some of them are actually very nice!</p>
<p>Would you suggest any other alternatives to WordPress? Be sure to leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/wordpress/five-alternatives-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Remember To Add Links</title>
		<link>http://fwebde.com/blogging/remember-to-add-links/</link>
		<comments>http://fwebde.com/blogging/remember-to-add-links/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 08:23:17 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2447</guid>
		<description><![CDATA[I don't know about you, but as I'm writing a blog post, I often find myself remembering a link I read earlier that is related to the subject as I'm typing. So, I usually type out the text of the link, and try to remember to add the link in later. Unfortunately, we all forget things like this too often.]]></description>
			<content:encoded><![CDATA[<p>I don't know about you, but as I'm writing a blog post, I often find myself remembering a link I read earlier that is related to the subject as I'm typing. So, I usually type out the text of the link, and try to remember to add the link in later. Unfortunately, we all forget things like this too often.</p>
<p>If you find yourself doing this from time to time, here is a quick tip to help you remember to find the URL you need. First, add something like this into your CSS:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;">a <span style="color: #6666ff;">.find-url</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#9e0016</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f93e58</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>The colours in there don't really matter at all, as long as you choose something that will stand out to you when you look over your draft of the post. Once you have that in your CSS, style the links you can't remember like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;find-url&quot;</span>&gt;</span>I can't remember the URL right now.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></td></tr></table></div>

<p>Now, when you look over your post to revise it, the links you couldn't remember while typing out your post should be highlighted <a style="color:#9e0016;background:#f93e58;">like this</a>, to remind you to go and find the URL you would like to link to.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/blogging/remember-to-add-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Understanding the CSS z-index Property</title>
		<link>http://fwebde.com/css/understanding-z-index/</link>
		<comments>http://fwebde.com/css/understanding-z-index/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 08:23:16 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2438</guid>
		<description><![CDATA[When we think of CSS and web design, we generally think in two dimensions. After all, the screens we use to view websites display the page as a two-dimensional image. Two of the most common CSS properties, <code>width</code> and <code>height</code>, match that.]]></description>
			<content:encoded><![CDATA[<p>When we think of CSS and web design, we generally think in two dimensions. After all, the screens we use to view websites display the page as a two-dimensional image. Two of the most common CSS properties, <code>width</code> and <code>height</code>, match that.</p>
<p>If you are new to CSS, you might not have heard about the <code>z-index</code> property. This property allows you to control the position of elements on the page in terms of layers, essentially adding a third dimension to the page.</p>
<h3>Using z-index</h3>
<p>The z-index of an element on the page is the layer that it is on, with the default being <strong>0</strong>. As the z-index of an element increases, so does its layer.</p>
<p>Let's look at a quick example:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#box1</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#1144aa</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">30px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#box2</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ffd100</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">75px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">20</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#box3</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ff6f00</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">125px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">40px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">30</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>With the sizes and positions of #box1, #box2 and #box3, there will be a space on the page that is occupied by all of these elements. By applying the z-index property to these boxes, we can define which one is on the top, which is in the middle, and which one is on the bottom, giving us something like this:</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/z-index1.png" alt="" title="z-index1" width="227" height="217" class="size-full wp-image-2443" style="border:none" /></p>
<p>Now if we can imagine looking at the image from the side, we can visually see how the different layers are positioned on top of each other.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/z-index-layers.png" alt="" title="z-index-layers" width="400" height="400" class="alignnone size-full wp-image-2444" style="border:none" /></p>
<p>Try changing the z-index values for each of the elements, and you should be able to see how the resulting image changes. Try adding some more elements in there, and seeing what different combinations can be made.</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/css/understanding-z-index/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hexadecimal Colour Codes Explained</title>
		<link>http://fwebde.com/web-design/hex-colour-codes-explained/</link>
		<comments>http://fwebde.com/web-design/hex-colour-codes-explained/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 08:22:51 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=2397</guid>
		<description><![CDATA[No web developer can go a day without encountering any method of representing colour on the web. There are many ways of representing colour, some have advantages and disadvantages over others, but of course, the vastly popular and most well-known option is hex colour codes.]]></description>
			<content:encoded><![CDATA[<p>No web developer can go a day without encountering any method of representing colour on the web. There are many ways of representing colour, some have advantages and disadvantages over others, but of course, the vastly popular and most well-known option is hex colour codes.</p>
<p>Across the internet, you'll find many tables offering a visual representation of selected hex codes, sometimes even with colour pickers, often with many other helpful features. However, I thought it would be interesting to learn about how these mysterious codes actually work.</p>
<h3>How do they work?</h3>
<p>When you first came across a hex colour code such as <strong>#0FCA3E</strong> during your adventures in learning web design, you probably thought that it would be painful to have to memorize all of these seemingly random codes. But like (almost) everything, there is some sort of order behind the perceived chaos.</p>
<p>When viewing an image on a computer screen, the individual pixels are displayed using the <a href="http://en.wikipedia.org/wiki/RGB_color_model">RGB colour model</a>. This is an additive colour model, meaning that varying degrees of different colours of light (red, green, and blue in this case) are mixed together to produce a wide array of different colours.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/rgb.png" alt="" title="Image of an LCD pixel, showing the individual subpixels." width="125" height="125" class="alignright size-full wp-image-2404" /></p>
<p>This can be easily seen in LCD displays. If you look very closely, you'll be able to see that each pixel is divided into three subpixels, each of which display either red, green, or blue light, which go together to form a full pixel. In the image to the right, you can see three subpixels, each displaying the colour at its full intensity, which a user would see as white when sitting at a reasonable distance away from their monitor.</p>
<h4>How do we control this?</h4>
<p>We can control how colours are displayed by using, you guessed it, hex colour codes. These codes can look very cryptic at first, but once you understand them, it's really quite simple.</p>
<p>Every hex colour code is a six-digit hexadecimal number consisting of three parts. Each of these parts represents the intensity of the red, green, or blue light, respectively. This is called a hex <em>triplet</em>.</p>
<p>Each part of a hex triplet is represented using the hexadecimal number system. This system uses the digits 0-9, and it continues with A representing 10, B for 11, up to F, for 15. This is used because two hexadecimal digits can represent exactly one byte of information, which makes it easy for computers to work with.</p>
<p>Because one byte of information can have 256 possible values, and each hex triplet is three bytes long, the number of colours that can be represented using hex codes is 16,777,216, or 256<span style="font-size:10px;vertical-align:super;">3</span>.</p>
<p>Because a picture is worth a thousand words (even if it's a picture of text), here is a quick example of a couple hex triplets, with their decimal representations.</p>
<p><img src="http://fwebde.com/wp-content/uploads/2010/06/hex.png" alt="A couple examples of hex colour codes with their decimal representations." width="500" height="430" class="size-full wp-image-2412" style="border:none" /></p>
<p>Well now that you know how hex colour codes work, with some practice it should be easy to read and understand any hex triplets you may come across. If you're feeling confident, you can give this game a try: <a href="http://yizzle.com/whatthehex/">What the hex</a>.</p>
<p><cite><a href="http://en.wikipedia.org/wiki/File:RGB_illumination.jpg">Thumbnail source</a></cite></p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/hex-colour-codes-explained/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>10+ Examples Of Effective Forum Designs</title>
		<link>http://fwebde.com/web-design/effective-forum-designs/</link>
		<comments>http://fwebde.com/web-design/effective-forum-designs/#comments</comments>
		<pubDate>Thu, 27 May 2010 08:02:12 +0000</pubDate>
		<dc:creator>Eric Bannatyne</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://fwebde.com/?p=1368</guid>
		<description><![CDATA[I've posted earlier <a href="http://fwebde.com/web-design/forum-design/">on internet forum design</a>, including tips to remember when working on a forum design. Here are some examples of forum designs that are very effective, consider these tips, and generally look nice.

Here are some examples of excellent forum designs that look great, are usable, and help the general "feel" of a community.]]></description>
			<content:encoded><![CDATA[<p>I've posted earlier <a href="http://fwebde.com/web-design/forum-design/">on internet forum design</a>, including tips to remember when working on a forum design. Here are some examples of forum designs that are very effective, consider these tips, and generally look nice.</p>
<p>Here are some examples of excellent forum designs that look great, are usable, and help the general "feel" of a community.</p>
<h3 class="clearing">Default Forum Themes</h3>
<p><a href="http://forums.xkcd.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/xkcd.png" alt="" title="xkcd Forums" width="600" height="200" class="aligncenter size-full wp-image-1415" /></a></p>
<p>The default theme for a forum software can work well at times. For example, support forums often stick with a default theme because they don't exactly need users to stay around, because most people will register, ask a question and leave.</p>
<p>Many communities can also get away with using a default theme. For example, <a href="http://forums.xkcd.com/">xkcd Forums</a> uses the PHPBB default theme (Even the blog uses the WordPress default theme). You can also see the vBulletin default theme being used everywhere. I think even the <a href="http://forums.digitalpoint.com/">DigitalPoint</a> theme is based off of it.</p>
<h3>Ubuntu Forums</h3>
<p><a href="http://ubuntuforums.org/"><img src="http://fwebde.com/wp-content/uploads/2010/01/ubuntu.png" alt="" title="Ubuntu Forums" width="600" height="200" class="aligncenter size-full wp-image-1413" /></a></p>
<p><a href="http://ubuntuforums.org/">Ubuntu Forums</a> is a great community providing support for all things related to <a href="http://ubuntu.com/">Ubuntu.</a> The layout of the board index is a bit different from the standard forum layout, because of such a large number of categories. I'd say they could easily get away with being different, because even this layout is so easy to use.</p>
<h3>TalkFreelance</h3>
<p><a href="http://www.talkfreelance.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/tf.png" alt="" title="TalkFreelance" width="600" height="200" class="aligncenter size-full wp-image-1411" /></a></p>
<p>The design of <a href="http://www.talkfreelance.com/">TalkFreelance</a> is simply <em>stunning</em>. It has an excellent use of colours that aren't often seen on forums, and makes good use of a sidebar for displaying user information and forum statistics.</p>
<h3>ExpressionEngine Forums</h3>
<p><a href="http://expressionengine.com/forums/"><img src="http://fwebde.com/wp-content/uploads/2010/01/ee.png" alt="" title="ExpressionEngine Forums" width="600" height="200" class="aligncenter size-full wp-image-1408" /></a></p>
<p>The <a href="http://expressionengine.com/forums/">ExpressionEngine Forums</a> have a nice clean design, following a more standard forum layout.</p>
<h3>Design Forums</h3>
<p><a href="http://www.designforums.co.uk/"><img src="http://fwebde.com/wp-content/uploads/2010/01/designforums.png" alt="" title="Design Forums" width="600" height="200" class="aligncenter size-full wp-image-1406" /></a></p>
<p>Many of the elements of <a href="http://www.designforums.co.uk/">Design Forums</a> are quite simple, but the way they are put together make it into an excellent forum design.</p>
<h3>Wiimote Project</h3>
<p><a href="http://www.wiimoteproject.com/index.php?action=forum"><img src="http://fwebde.com/wp-content/uploads/2010/01/wiimote.png" alt="" title="Wiimote Project" width="600" height="200" class="aligncenter size-full wp-image-1414" /></a></p>
<p><a href="http://www.wiimoteproject.com/index.php?action=forum">Wiimote Project</a> has a nice, clean theme for <a href="http://simplemachines.org/" title="Simple Machines Forum">SMF</a>, placing more emphasis than usual on the numbers of posts and topics.</p>
<p>If you go to <a href="http://www.wiimoteproject.com/index.php">the actual home page of Wiimote Project</a>, instead of the usual board index you will find a portal page listing the latest posts, and various forum statistics.</p>
<h3>The Admin Zone</h3>
<p><a href="http://www.theadminzone.com/forums/"><img src="http://fwebde.com/wp-content/uploads/2010/01/taz.png" alt="" title="The Admin Zone" width="600" height="200" class="aligncenter size-full wp-image-1410" /></a></p>
<p><a href="http://www.theadminzone.com/forums/">The Admin Zone</a> uses a fairly standard theme, with a table used for the board index. The home page is similar to a portal, but containing various articles, interviews and more.</p>
<h3>Boagworld</h3>
<p><a href="http://www.boagworld.com/forum/"><img src="http://fwebde.com/wp-content/uploads/2010/01/boag.png" alt="" title="Boagworld" width="600" height="200" class="aligncenter size-full wp-image-1405" /></a></p>
<p>The layout of <a href="http://www.boagworld.com/forum/">Boagworld</a> is less standard. Instead of using a table to list the forums, each forum is displayed with a list of the latest posts.</p>
<h3>Typophile Forums</h3>
<p><a href="http://typophile.com/forum"><img src="http://fwebde.com/wp-content/uploads/2010/01/typophile.png" alt="" title="Typophile" width="600" height="200" class="aligncenter size-full wp-image-1412" /></a></p>
<p>The <a href="http://typophile.com/forum">Typophile Forums</a> have a clean and simple design, with only a few categories.</p>
<h3>FreelanceSwitch Forum</h3>
<p><a href="http://forum.freelanceswitch.com/"><img src="http://fwebde.com/wp-content/uploads/2010/01/freelancesw.png" alt="" title="FreelanceSwitch Forum" width="600" height="200" class="aligncenter size-full wp-image-1409" /></a></p>
<p>The <a href="http://forum.freelanceswitch.com/">FreelanceSwitch Forum</a> is another example of a forum with a less common layout. The board index contains a list of the latest posts, with the forums (topics) displayed in a drop-down menu.</p>
<p>What other forums do you think have effective designs?</p>
]]></content:encoded>
			<wfw:commentRss>http://fwebde.com/web-design/effective-forum-designs/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
